Skip to content

Commit b21e587

Browse files
committed
Merge pull request #1084 from dnos/chamilo-pr/1.10.x
Add config variables for smtp: SMTP_DEBUG and SMTP_SECURE
2 parents a2cc027 + 869e06d commit b21e587

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/config/mail.conf.dist.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@
1717
$platform_email['SMTP_PASS'] = '';
1818
$platform_email['SMTP_CHARSET'] = 'UTF-8';
1919
$platform_email['SMTP_UNIQUE_SENDER'] = 0; // to send all mails from the same user
20+
$platform_email['SMTP_DEBUG'] = 0; // change to 1 to enable smtp debug
21+
$platform_email['SMTP_SECURE'] = 'tls'; // if you're using SSL: ssl; or TLS: tls. (only used if SMTP_AUTH==1)

main/inc/lib/api.lib.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7877,7 +7877,11 @@ function api_mail_html(
78777877
$mail->SMTPAuth = 1;
78787878
$mail->Username = $platform_email['SMTP_USER'];
78797879
$mail->Password = $platform_email['SMTP_PASS'];
7880+
if (isset($platform_email['SMTP_SECURE'])) {
7881+
$mail->SMTPSecure = $platform_email['SMTP_SECURE'];
7882+
}
78807883
}
7884+
$mail->SMTPDebug = isset($platform_email['SMTP_DEBUG'])?$platform_email['SMTP_DEBUG']:0;
78817885

78827886
// 5 = low, 1 = high
78837887
$mail->Priority = 3;

0 commit comments

Comments
 (0)