diff options
author | j-ed <juergen@eisfair.org> | 2013-01-22 14:13:24 +0100 |
---|---|---|
committer | j-ed <juergen@eisfair.org> | 2013-01-22 14:13:24 +0100 |
commit | df6ba6955d8fe9692ce9028f71cde962dcc89030 (patch) | |
tree | 8e295a0599c37d6fe909eb4f932df72b922d2e71 /lib/mail.php | |
parent | dd40b691eee34d313a5894afbc7ccf217968fd94 (diff) | |
download | nextcloud-server-df6ba6955d8fe9692ce9028f71cde962dcc89030.tar.gz nextcloud-server-df6ba6955d8fe9692ce9028f71cde962dcc89030.zip |
Update lib/mail.php
Added three additional mail_smtp.. parameters.
- mail_smtpdebug - enable debug messages to analyse SMTP problems.
- mail_smtptimeout - set SMTP timeout which is set to 10s by
default and this is sometimes to short especially if a malware/
spam scanner is used.
- mail_smtpsecure - force secure SMTP connections.
Diffstat (limited to 'lib/mail.php')
-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) { |