|
|
|
|
@ -62,19 +62,19 @@ function smtp_mail($from, $recipients, &$headers, &$body, &$response)
|
|
|
|
|
$smtp_host_url = parse_url($CONFIG['smtp_server']);
|
|
|
|
|
|
|
|
|
|
// overwrite port
|
|
|
|
|
if ($smtp_host_url['host'] && $smtp_host_url['port'])
|
|
|
|
|
if (isset($smtp_host_url['host']) && isset($smtp_host_url['port']))
|
|
|
|
|
{
|
|
|
|
|
$smtp_host = $smtp_host_url['host'];
|
|
|
|
|
$smtp_port = $smtp_host_url['port'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// re-write smtp host
|
|
|
|
|
if ($smtp_host_url['host'] && $smtp_host_url['scheme'])
|
|
|
|
|
if (isset($smtp_host_url['host']) && isset($smtp_host_url['scheme']))
|
|
|
|
|
$smtp_host = sprintf('%s://%s', $smtp_host_url['scheme'], $smtp_host_url['host']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// create Net_SMTP object and connect to server
|
|
|
|
|
if (!is_object($smtp_conn))
|
|
|
|
|
if (!is_object($SMTP_CONN))
|
|
|
|
|
{
|
|
|
|
|
$helo_host = empty($CONFIG['smtp_helo_host']) ? (empty($_SERVER['SERVER_NAME']) ? 'localhost' : $_SERVER['SERVER_NAME']) : $CONFIG['smtp_helo_host'];
|
|
|
|
|
$SMTP_CONN = new Net_SMTP($smtp_host, $smtp_port, $helo_host);
|
|
|
|
|
|