【发布时间】:2016-12-11 15:29:17
【问题描述】:
我正在尝试将电子邮件从我的网站发送到我的 godaddy 邮件和 zoho 邮件,但它不起作用。 我在我的 gmail 帐户上尝试了它,它工作正常。 我正在使用phpmailer。 我的代码-
require_once "PHPMailerAutoload.php";
//PHPMailer Object
$mail = new PHPMailer;
//From email address and name
$mail->From = "test@deltware.com";
$mail->FromName = "Himanshu Mishra";
$mail->addAddress("my godaddy webmail"); //Recipient name is optional
//Send HTML or Plain Text email
$mail->isHTML(true);
$mail->Subject = "Subject Text";
$mail->Body = "<i>Mail body in HTML</i>";
$mail->AltBody = "This is the plain text version of the email content";
if(!$mail->send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message has been sent successfully";
}
请帮忙!!!!!!
【问题讨论】:
-
你能发布完整的代码吗?似乎它不是完整的代码。 Zoho & godaddy 对 phpmailer 有不同的设置,你想用什么?