mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +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');
|
$setting = get_setting('smtp');
|
||||||
// Create the Transport
|
// 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'])
|
->setUsername($setting['accountname'])
|
||||||
->setPassword($setting['accountpassword'])
|
->setPassword($setting['accountpassword'])
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user