PHPMailer 経由でメールを送信しようとすると、次のエラーが発生します。
非推奨: preg_replace(): /e 修飾子は非推奨です。代わりに、/home/u722941258/public_html/old/account/access/mailer/class.phpmailer.php の 1727 行で preg_replace_callback を使用してください
SMTP -> エラー: サーバーに接続できませんでした: 接続がタイムアウトしました (110)
SMTP エラー: SMTP ホストに接続できませんでした。
PHP コード:
function send_mail($email,$message,$subject)
{
require_once('mailer/class.phpmailer.php');
$mail = new PHPMailer();
$mail->SMTPDebug = 3;
$mail->isSMTP();
$mail->Host = 'smtp.sparkpostmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'USER';
$mail->Password = 'SECRET';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->AddAddress($email);
$mail->SetFrom('admin@email.sosgram.ga','Verificación de Cuentas');
$mail->AddReplyTo("soporte@email.sosgram.ga","Soporte SOSgram");
$mail->Subject = $subject;
$mail->MsgHTML($message);
$mail->Send();
}
解決策はありますか?
ホスティング: http://hostinger.es
SMTP: http://sparkpost.com