I am trying to send an email in following way -
from : [email protected]
reply-to : [email protected]
to : [email protected]
cc : [email protected]
My email is getting delivered to the address mentioned in CC (If I replace the emails to and cc, then email is sent to the address mentioned in to)
For some reason, email is not getting delivered to the address [email protected]. If I send the email manually to this address using outlook or gmail, then email is actually delivered. How can I debug this issue ?
I checked spam/junk directories as well, no emails over there. I tried using php mail() function as well as phpmailer class. Both of them return TRUE. What could the reason ? Please help.
$mail->From = "[email protected]";
$mail->AddReplyTo("[email protected]");
$mail->AddAddress("[email protected]");
$mail->AddCC("[email protected]");
$mail->Subject = $subject;
$mail->Body = $message;
if(! $mail->Send()) {
echo "Message was not sent";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
mail ()
doesn't have a solid debug mechanism. So you can't know for sure where the problem lies. - asprin