Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: ampache-dev <ampache-dev <at> lists.oregonstate.edu>
Subject: Ampache SVN - r2464 - in trunk: config lib/class
Newsgroups: gmane.comp.web.ampache.devel
Date: Tuesday 26th October 2010 23:06:56 UTC (over 6 years ago)
Author: flowerysong
Date: 2010-10-26 16:06:55 -0700 (Tue, 26 Oct 2010)
New Revision: 2464

Modified:
   trunk/config/ampache.cfg.php.dist
   trunk/lib/class/ampachemail.class.php
Log:
Fix authenticated SMTP and add secure (TLS/SSL) SMTP.


Modified: trunk/config/ampache.cfg.php.dist
===================================================================
--- trunk/config/ampache.cfg.php.dist	2010-10-24 21:55:51 UTC (rev 2463)
+++ trunk/config/ampache.cfg.php.dist	2010-10-26 23:06:55 UTC (rev 2464)
@@ -612,6 +612,11 @@
 ;DEFAULT: 25
 ;mail_port = 25
 
+;Secure SMTP
+;POSSIBLE VALUES: ssl tls
+;DEFAULT: none
+;mail_secure_smtp = tls
+
 ;Enable SMTP authentication
 ;DEFAULT: false
 ;mail_auth = true

Modified: trunk/lib/class/ampachemail.class.php
===================================================================
--- trunk/lib/class/ampachemail.class.php	2010-10-24 21:55:51 UTC (rev
2463)
+++ trunk/lib/class/ampachemail.class.php	2010-10-26 23:06:55 UTC (rev
2464)
@@ -163,10 +163,13 @@
 				$mail->Host = $mailhost;
 				$mail->Port = $mailport;
 				if($mailauth == true) {
-					$mail->SMTPAuth(true);
+					$mail->SMTPAuth = true;
 					$mail->Username = $mailuser;
 					$mail->Password = $mailpass;
 				}
+				if ($mailsecure = Config::get('mail_secure_smtp')) {
+					$mail->SMTPSecure = ($mailsecure == 'ssl') ? 'ssl' : 'tls';
+				}
 			break;
 			case 'sendmail':
 				$mail->IsSendmail();
 
CD: 4ms