Php Pear Mail无法使用SSL

时间:2017-04-17 15:25:55

标签: php email pear

我有以下脚本:

$extraheaders["From"] = "newsletter@domain.de";
$extraheaders["To"] = $email;
$extraheaders["Subject"] = $betreff;
$extraheaders["Reply-To"] = $absender;
$extraheaders["Content-Type"] = "text/plain; charset=ISO-2022-JP";
$extraheaders["Return-path"] = "newsletter@domain.de";   
$smtpinfo["host"] = "smtprelaypool.ispgateway.de";
$smtpinfo["port"] = "465";
$smtpinfo["auth"] = "PLAIN";
$smtpinfo["socket_options"] = array('ssl' => array('verify_peer_name' => false));
$smtpinfo["timeout"] = "1";
$smtpinfo["debug"] = "true";
$smtpinfo["username"] = "newsletter@domain.de";
$smtpinfo["password"] = "***"; 
$smtp = Mail::factory('smtp',$smtpinfo);
$message = new Mail_mime();
$message->setTXTBody($text);
$body = $message->get();
$headers = $message->headers($extraheaders);
$mail = $smtp->send("jens@hantschel.info", $headers, $body);

光标继续旋转和旋转。我设置的超时无效。有什么建议吗?

0 个答案:

没有答案