error send email with phpmailer in server domain but succed in localhost

扶醉桌前 提交于 2020-01-17 04:04:44

问题


i have detail error with this problem,

SMTP -> FROM SERVER:220-server.modulindo.com ESMTP Exim 4.77 #2 Wed, 11 Jul 2012 10:57:22 +0700 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. SMTP -> FROM SERVER: 250-server.modulindo.com Hello mail.modulindo.com [202.67.9.42] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP SMTP -> ERROR: Password not accepted from server: 535 Incorrect authentication data SMTP -> FROM SERVER:250 Reset OK

please help me guys!?

i have a problem with phpmailer. i send email with phpmailer in localhost is succeed, but when i upload it in my server domain, there was an error happend. the error is..

SMTP Error: Could not authenticate. Mailer Error: SMTP Error: Could not authenticate.

this is my script..

....
$mail = new PHPMailer();

$mail->IsSMTP();

$mail->Mailer = "smtp";

$mail->Host = "ssl://smtp.gmail.com";

$mail->Port = 465;

$mail->SMTPAuth = true;

$mail->Username = "wasis85@gmail.com";

$mail->Password = "password"; 

$mail->From     = "wasis85@gmail.com";

$mail->FromName = "Wasis Lukito";

$mail->AddAddress($ema[$ari_no],"wasis");

$mail->AddCC("wasisl85@yahoo.com");

$mail->AddReplyTo("wasisl85@yahoo.com","Wasis Lukito");

$mail->WordWrap = 50;

$mail->IsHTML(true);

$mail->Subject  =  "Penolakan Data BPLPSE";

$mail->Body     =  "Alasan di tolak ";

$mail->AltBody  =  "This research is supported by Google.com";

...

回答1:


i solved same problem with comment (or cancel) this line

// $mail->IsSMTP();

this because from some server i had same error: SMTP Error: Could not authenticate (also Password is incorrect...etc)




回答2:


The script seems to be fine. I believe you have to check and make sure if your server supports SMTP or it has been properly configured for SMTP or not.



来源:https://stackoverflow.com/questions/11410429/error-send-email-with-phpmailer-in-server-domain-but-succed-in-localhost

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!