Update e-mail tester script to only show if the test directory is there (representative of a development platform or platform managed by a developer). Add documentation - refs CT#8308

pull/2487/head
Yannick Warnier 9 years ago
parent 05835c5861
commit d4f7a9cda6
  1. 2
      app/config/mail.conf.dist.php
  2. 4
      main/admin/index.php
  3. 4
      main/inc/lib/message.lib.php

@ -10,7 +10,7 @@ $platform_email['SMTP_FROM_EMAIL'] = (isset($administrator['email']) ? $administ
$platform_email['SMTP_FROM_NAME'] = (isset($administrator['name']) ? $administrator['name'] : 'Admin'); $platform_email['SMTP_FROM_NAME'] = (isset($administrator['name']) ? $administrator['name'] : 'Admin');
$platform_email['SMTP_HOST'] = 'localhost'; $platform_email['SMTP_HOST'] = 'localhost';
$platform_email['SMTP_PORT'] = 25; $platform_email['SMTP_PORT'] = 25;
$platform_email['SMTP_MAILER'] = 'sendmail'; // mail, sendmail or smtp $platform_email['SMTP_MAILER'] = 'mail'; // mail, sendmail or smtp (Windows probably only supports smtp)
$platform_email['SMTP_AUTH'] = 0; $platform_email['SMTP_AUTH'] = 0;
$platform_email['SMTP_USER'] = ''; $platform_email['SMTP_USER'] = '';
$platform_email['SMTP_PASS'] = ''; $platform_email['SMTP_PASS'] = '';

@ -337,7 +337,9 @@ if (api_is_platform_admin()) {
$items[] = array('url' => 'archive_cleanup.php', 'label' => get_lang('ArchiveDirCleanup')); $items[] = array('url' => 'archive_cleanup.php', 'label' => get_lang('ArchiveDirCleanup'));
$items[] = array('url' => 'resource_sequence.php', 'label' => get_lang('ResourcesSequencing')); $items[] = array('url' => 'resource_sequence.php', 'label' => get_lang('ResourcesSequencing'));
$items[] = ['url' => 'email_tester.php', 'label' => get_lang('EMailTester')]; if (is_dir(api_get_path(SYS_TEST_PATH))) {
$items[] = ['url' => 'email_tester.php', 'label' => get_lang('EMailTester')];
}
if (api_get_configuration_value('db_manager_enabled') == true && api_is_global_platform_admin()) { if (api_get_configuration_value('db_manager_enabled') == true && api_is_global_platform_admin()) {
$host = $_configuration['db_host']; $host = $_configuration['db_host'];

@ -1890,6 +1890,10 @@ class MessageManager
/** /**
* Get the error log from failed mailing * Get the error log from failed mailing
* This assumes a complex setup where you have a cron script regularly copying the mail queue log
* into app/cache/mail/mailq.
* This can be done with a cron command like (check the location of your mail log file first):
* @example 0,30 * * * * root cp /var/log/exim4/mainlog /var/www/chamilo/app/cache/mail/mailq
* @return array|bool * @return array|bool
*/ */
public static function failedSentMailErrors() public static function failedSentMailErrors()

Loading…
Cancel
Save