dorkahemp972157683 2015-06-03 10:02
浏览 35

PHPMailer不会发送带有IsHTML(true)或任何HTML代码的Mails

I'm currently trying to get PHPMailer to send an E-Mail with a verification Link. To get this done I need to use the html A Tag so I set IsHTML true but somehow the Mails won't go out then anymore.

Here's my current code.

    //Send Welcome E-Mail
$mail = new PHPMailer();

$mail->IsSMTP();                                      // set mailer to use SMTP
$mail->Host = "smtp.yaay.de";  // specify main and backup server
$mail->Port = "465";
$mail->SMTPAuth = true;     // turn on SMTP authentication
$mail->SMTPSecure = 'ssl';
$mail->Username = "admin@whatever.net";  // SMTP username
$mail->Password = "pass"; // SMTP password

$mail->From = "admin@whatever.net";
$mail->FromName = "Whatever";
$mail->AddAddress($receiver, $receivername);                  // name is optional

$mail->Subject = "Welcome, $receivername!";
$mail->Body    = "To activate your Account, please visit the following link: <a href = '?test'>test</a>";
$mail->IsHTML(true);

$mail->Send();

if(!$mail->Send())
{
    die($mail->ErrorInfo);
}

No errror is displayed, I have no idea how to find out where the problem is. :( I just know that any html code or IsHTML(true) is enough to kill the E-Mail sending process. :/

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统