Here is the problem, I just implemented PHPMailer and print the Mime Header to the screen after sending the email. I use the latest PHPMailer code specified in GITHUB and I went through almost everything, but I can not find the reason why it prints on the screen. Let me know if you need more information. I don't seem to think about anything else. See below:
2013-09-30 20:37:14 CLIENT -> SERVER: AUTH LOGIN 2013-09-30 20:37:14 CLIENT -> SERVER: ZGFwaWVjaG9jxXlAZ21haWwuY29t 2013-09-30 20:37:14 CLIENT -> SERVER: ZHBpZT5HNzE= 2013-09-30 20:37:15 CLIENT -> SERVER: MAIL FROM:< xxxxx@xxxxxx.com > 2013-09-30 20:37:15 CLIENT -> SERVER: RCPT TO:< yyyyy@yyyyyyy.com > 2013-09-30 20:37:15 CLIENT -> SERVER: DATA 2013-09-30 20:37:15 CLIENT -> SERVER: Date: Mon, 30 Sep 2013 16:37:14 -0400 2013-09-30 20:37:15 CLIENT -> SERVER: Return-Path: < xxxxx@xxxxxxx.com > 2013-09-30 20:37:15 CLIENT -> SERVER: To: Someone < yyyyyy@yyyyyyyy.com > 2013-09-30 20:37:15 CLIENT -> SERVER: From: xxxxxxx xxxxx < xxxxx@xxxxxxx .com> 2013-09-30 20:37:15 CLIENT -> SERVER: Subject: xxxxxxx.com Confirmation 2013-09-30 20:37:15 CLIENT -> SERVER: Message-ID: < c22a17772edd75gh89td324ac0fe67ae@localhost > 2013-09-30 20:37:15 CLIENT -> SERVER: X-Priority: 3 2013-09-30 20:37:15 CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.7 (https:
Here is the implementation code:
require("class.phpmailer.php"); $mail = new PHPMailer; $mail->From = ' xxxxx@xxxxxxx.com '; $mail->FromName = 'xxxxxxx xxxxx'; $mail->addAddress($email, $fname); $mail->addReplyTo('', ''); $mail->IsSMTP(); $mail->SMTPDebug = 1; $mail->SMTPAuth = true; $mail->SMTPSecure = 'ssl'; $mail->Host = "smtpout.secureserver.net "; $mail->Port = 465; $mail->Username = " xxxxx@xxxxxxx.com "; $mail->Password = "password"; $mail->WordWrap = 50; $mail->isHTML(true); $mail->Subject = 'xxxxxxx.com Confirmation'; $mail->Body = "This is the text body of the message, it is printed here. blah blah blah"; $mail->AltBody = "This is the alternate text body for non-html email that may or may no be reading this.<br />This is also the text body"; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; exit; }
php email phpmailer
Dave_P
source share