diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2013-01-24 00:11:03 -0800 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2013-01-24 00:11:03 -0800 |
commit | f9a9fc5670505c4b3af9ca7b1294730e00330a3b (patch) | |
tree | 32edbf100373e4e3584f9a3d961998626dfcf244 /lib | |
parent | 3ff32eba2563aa0cce99e6c409cab34a04420dc1 (diff) | |
parent | dcda792fbcb3e5743e345553e2fc53fd19a742b9 (diff) | |
download | nextcloud-server-f9a9fc5670505c4b3af9ca7b1294730e00330a3b.tar.gz nextcloud-server-f9a9fc5670505c4b3af9ca7b1294730e00330a3b.zip |
Merge pull request #1265 from j-ed/master
add additional mail_smtp.. parameters to fix possible SMTP connection problems.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mail.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/mail.php b/lib/mail.php index 4683a1b4eee..ffc4d01b79f 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -40,6 +40,9 @@ class OC_Mail { $SMTPAUTH = OC_Config::getValue( 'mail_smtpauth', false ); $SMTPUSERNAME = OC_Config::getValue( 'mail_smtpname', '' ); $SMTPPASSWORD = OC_Config::getValue( 'mail_smtppassword', '' ); + $SMTPDEBUG = OC_Config::getValue( 'mail_smtpdebug', false ); + $SMTPTIMEOUT = OC_Config::getValue( 'mail_smtptimeout', 10 ); + $SMTPSECURE = OC_Config::getValue( 'mail_smtpsecure', '' ); $mailo = new PHPMailer(true); @@ -57,12 +60,15 @@ class OC_Mail { $mailo->Host = $SMTPHOST; $mailo->Port = $SMTPPORT; $mailo->SMTPAuth = $SMTPAUTH; + $mailo->SMTPDebug = $SMTPDEBUG; + $mailo->SMTPSecure = $SMTPSECURE; $mailo->Username = $SMTPUSERNAME; $mailo->Password = $SMTPPASSWORD; + $mailo->Timeout = $SMTPTIMEOUT; - $mailo->From =$fromaddress; + $mailo->From = $fromaddress; $mailo->FromName = $fromname;; - $mailo->Sender =$fromaddress; + $mailo->Sender = $fromaddress; $a=explode(' ', $toaddress); try { foreach($a as $ad) { |