Skip to content

Commit

Permalink
Merge pull request #1084 from dnos/chamilo-pr/1.10.x
Browse files Browse the repository at this point in the history
Add config variables for smtp: SMTP_DEBUG and SMTP_SECURE
  • Loading branch information
ywarnier committed Mar 22, 2016
2 parents a2cc027 + 869e06d commit b21e587
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/config/mail.conf.dist.php
Expand Up @@ -17,3 +17,5 @@
$platform_email['SMTP_PASS'] = '';
$platform_email['SMTP_CHARSET'] = 'UTF-8';
$platform_email['SMTP_UNIQUE_SENDER'] = 0; // to send all mails from the same user
$platform_email['SMTP_DEBUG'] = 0; // change to 1 to enable smtp debug
$platform_email['SMTP_SECURE'] = 'tls'; // if you're using SSL: ssl; or TLS: tls. (only used if SMTP_AUTH==1)
4 changes: 4 additions & 0 deletions main/inc/lib/api.lib.php
Expand Up @@ -7877,7 +7877,11 @@ function api_mail_html(
$mail->SMTPAuth = 1;
$mail->Username = $platform_email['SMTP_USER'];
$mail->Password = $platform_email['SMTP_PASS'];
if (isset($platform_email['SMTP_SECURE'])) {
$mail->SMTPSecure = $platform_email['SMTP_SECURE'];
}
}
$mail->SMTPDebug = isset($platform_email['SMTP_DEBUG'])?$platform_email['SMTP_DEBUG']:0;

// 5 = low, 1 = high
$mail->Priority = 3;
Expand Down

0 comments on commit b21e587

Please sign in to comment.