phpmailer - In "To" header same Address display two times in mail when using php mailer
869
When i send mail to [email protected] using php mailer then In "To" header same Address display two times in mail
Like This: To: [email protected]; [email protected]
simple i used this:
$mail->AddAddress("[email protected]");
$mail->Subject = $subject;
$mail->Body = $body;
$mail->IsHTML(true);
$mail->Send();
$mail->ClearAddresses();
Answer
Solution:
AddAddress must contain 2 values receiver mail and name.
When you don't set name the mail is used for both things mail and name.