php
  • email
  • phpmailer
  • 2016-11-09 5 views 0 likes 
    0
    $mail->From = "[email protected]"; 
    $mail->FromName = "Example"; 
    $mail->AddAddress($regMail); 
    $mail->AddReplyTo("[email protected]"); 
    $mail->IsHTML(true);   
    $mail->Subject = 'Please verify your Email Address'; 
    $mail->Body = 'To proceed with your account, we need to make sure this email address is yours. 
    Please click the below link to verify your email. <br/>http://example.com/activate.php?encrypt='.$valKey.'&email='.$regMail.'&action=activate 
    <br><br>If you didn\'t make this request, just ignore this mail.'; 
    

    これらのコードでエラーが発生します。しかし、私は体からリンクを削除すると、メールは正常に送信されます。なぜ、私を助けてくださいわからない。アドバンスSMTPエラー:データが受け付けられないPHPMailerでエラーが発生する

    +2

    上のSMTPのためにここにhttps://github.com/PHPMailer/PHPMailer

    電源を入れ

    require 'phpmailer/PHPMailerAutoload.php'; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 1; $mail->SMTPAuth = true; $mail->SMTPSecure = 'ssl'; $mail->Host = "smtp.gmail.com"; $mail->Port = 465; $mail->Username = ""; //Username removed $mail->Password = ""; //Password removed $mail->addReplyTo('[email protected]'); $mail->SetFrom('[email protected]', 'my name'); $mail->Subject = 'Please verify your Email Address '; $mail->AddAddress('[email protected]', 'my name'); $mail->Body = 'To proceed with your account, we need to make sure this email address is yours. Please click the below link to verify your email. <br/>http://example.com/activate.php?encrypt='.$valKey.'&email='.$regMail.'&action=activate <br><br>If you didn\'t make this request, just ignore this mail.'; if($mail->Send()) { echo "Message sent!"; }else { echo "Mailer Error: " . $mail->ErrorInfo; } 

    ダウンロードphpmailerのを、このようないくつかのことを試してみてください。 – chris85

    +0

    メーラーエラー:SMTPエラー:データが受け入れられません。 – Kavi

    答えて

    0

    のおかげでは、エラーを記入してくださいここでhttps://www.google.com/settings/security/lesssecureapps

    関連する問題