I am using PHPmailer; though probably a version from 2012 - I haven't updated it for a while.
I am sending mail like this:
$mail = new PHPMailer();
$mail -> IsSMTP();
$mail -> Host = "localhost";
$mail -> Port = 587;
$mail -> SMTPAuth = true;
$mail -> Username = EMAIL_USER;
$mail -> Password = EMAIL_PASS;
$mail -> From = EMAIL_USER;
$mail -> FromName = "My Company";
$mail -> AddAddress($email);
$mail -> AddReplyTo('<Same as "FROM">', 'User Name');
$mail -> IsHTML(true);
$mail -> Subject = 'This is my subject';
$mail -> Body = $body;
$result = $mail -> Send();
I have had many emails bounce back using the above code. I even removed the body variable and just hard coded "test" in there -- so I don't think my body is the cause.
I am wondering if there are other headers that I am not using that would help or does PHPMailer take care of this behind the scene?
EDIT: I am really asking if I a missing any important header information?