mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
send email use ssl encryption if port is 465
This commit is contained in:
@@ -1420,7 +1420,7 @@ function sent_mail($to,$fromname,$fromemail,$subject,$body,$type = "confirmation
|
||||
|
||||
$setting = get_setting('smtp');
|
||||
// Create the Transport
|
||||
$transport = (new Swift_SmtpTransport($setting['smtpaddress'], $setting['smtpport']))
|
||||
$transport = (new Swift_SmtpTransport($setting['smtpaddress'], $setting['smtpport'], $setting['smtpport'] == 465 ? 'ssl' : null))
|
||||
->setUsername($setting['accountname'])
|
||||
->setPassword($setting['accountpassword'])
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user