문제

When i send mail to ok@gmail.com using php mailer then In "To" header same Address display two times in mail

Like This: To: ok@gmail.com; ok@gmail.com

simple i used this:

$mail->AddAddress("ok@gmail.com");
$mail->Subject = $subject;
$mail->Body = $body;
$mail->IsHTML(true);
$mail->Send();
$mail->ClearAddresses();
도움이 되었습니까?

해결책

AddAddress must contain 2 values receiver mail and name.

$mail->AddAddress("ok@gmail.com", "Mr. John Smith");

When you don't set name the mail is used for both things mail and name.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top