Web Hosting Forum | Lunarpages

Author Topic: PHPMailer and AddOn Domain  (Read 3894 times)

Offline NigelBHall

  • Newbie
  • *
  • Posts: 1
PHPMailer and AddOn Domain
« on: May 15, 2015, 07:03:32 AM »
Hi Folks,

First time posting here. Having trouble setting up a PHPMailer script for a contact form on an AddOn domain. Everything seems to work OK but I don't get the emails.

Here's the script:

Code: [Select]
<?php
require './PHPMailer-master/PHPMailerAutoload.php';


$mail = new PHPMailer;
$mail->SMTPDebug 3;                               // Enable verbose debug output
$mail->Debugoutput 'html';
$mail->isSMTP();                                      // Set mailer to use SMTP
$mail->Host 'northbaydomains.com';  // Specify main and backup SMTP servers
$mail->SMTPAuth true;                               // Enable SMTP authentication
$mail->Username 'sales@northbaydomains.com';                 // SMTP username
$mail->Password '#########';                           // SMTP password
$mail->SMTPSecure 'ssl';                            // Enable TLS encryption, `ssl` also accepted
$mail->Port 465;                                    // TCP port to connect to

$mail->setFrom('sales@northbaydomains.com''George');
$mail->addAddress('nigel@parallelprose.com''Nigel');     // Add a recipient
$mail->addReplyTo('sales@northbaydomains.com''George');


$mail->isHTML(true);                                  // Set email format to HTML

$mail->Subject 'I am Interested in Purchasing Your Domain Name';
$mail->Body    'This is the HTML message body <b>in bold!</b>';
$mail->AltBody 'This is the body in plain text for non-HTML mail clients';

if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}

?>

And here's the debug response I get:

Code: [Select]
Connection: opening to ssl://northbaydomains.com:465, timeout=300, options=array ()
Connection: opened
SERVER -> CLIENT: 220-prospero.lunarpages.com ESMTP Exim 4.80 #2 Fri, 15 May 2015 07:46:13 -0700 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.
CLIENT -> SERVER: EHLO northbaydomains.com
SERVER -> CLIENT: 250-prospero.lunarpages.com Hello prospero.lunarpages.com [67.210.120.35]250-SIZE 52428800250-8BITMIME250-AUTH PLAIN LOGIN250 HELP
CLIENT -> SERVER: AUTH LOGIN
SERVER -> CLIENT: 334 VXNlcm5hbWU6
CLIENT -> SERVER: c2FsZXNAbm9ydGhiYXlkb21haW5zLmNvbQ==
SERVER -> CLIENT: 334 UGFzc3dvcmQ6
CLIENT -> SERVER: TWthNlE0V2VSWQ==
SERVER -> CLIENT: 235 Authentication succeeded
CLIENT -> SERVER: MAIL FROM:<sales@northbaydomains.com>
SERVER -> CLIENT: 250 OK
CLIENT -> SERVER: RCPT TO:<nigel@parallelprose.com>
SERVER -> CLIENT: 250 Accepted
CLIENT -> SERVER: DATA
SERVER -> CLIENT: 354 Enter message, ending with "." on a line by itself
CLIENT -> SERVER: Date: Fri, 15 May 2015 07:46:13 -0700
CLIENT -> SERVER: To: Nigel <nigel@parallelprose.com>
CLIENT -> SERVER: From: George <sales@northbaydomains.com>
CLIENT -> SERVER: Reply-To: George <sales@northbaydomains.com>
CLIENT -> SERVER: Subject: I am Interested in Purchasing Your Domain Name
CLIENT -> SERVER: Message-ID: <c21182dbae6cc7552f376b2c5a96b8cb@northbaydomains.com>
CLIENT -> SERVER: X-Priority: 3
CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.10 (https://github.com/PHPMailer/PHPMailer/)
CLIENT -> SERVER: MIME-Version: 1.0
CLIENT -> SERVER: Content-Type: multipart/alternative;
CLIENT -> SERVER: boundary="b1_c21182dbae6cc7552f376b2c5a96b8cb"
CLIENT -> SERVER: Content-Transfer-Encoding: 8bit
CLIENT -> SERVER:
CLIENT -> SERVER: This is a multi-part message in MIME format.
CLIENT -> SERVER:
CLIENT -> SERVER: --b1_c21182dbae6cc7552f376b2c5a96b8cb
CLIENT -> SERVER: Content-Type: text/plain; charset=us-ascii
CLIENT -> SERVER:
CLIENT -> SERVER: This is the body in plain text for non-HTML mail clients
CLIENT -> SERVER:
CLIENT -> SERVER:
CLIENT -> SERVER: --b1_c21182dbae6cc7552f376b2c5a96b8cb
CLIENT -> SERVER: Content-Type: text/html; charset=us-ascii
CLIENT -> SERVER:
CLIENT -> SERVER: This is the HTML message body <b>in bold!</b>
CLIENT -> SERVER:
CLIENT -> SERVER:
CLIENT -> SERVER:
CLIENT -> SERVER: --b1_c21182dbae6cc7552f376b2c5a96b8cb--
CLIENT -> SERVER:
CLIENT -> SERVER: .
SERVER -> CLIENT: 250 OK id=1YtGsQ-00067c-3f
CLIENT -> SERVER: QUIT
SERVER -> CLIENT: 221 prospero.lunarpages.com closing connection
Connection: closed
Message has been sent

Any help much appreciated

Nigel

Offline scanman20

  • Senior Moderator
  • Über Jedi
  • *****
  • Posts: 1550
    • http://www.notonebit.com
Re: PHPMailer and AddOn Domain
« Reply #1 on: May 19, 2015, 07:10:25 AM »
Checked your spam or junk mail folders?
Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP (<- unused since 2006!)

Offline doncht

  • Intergalactic Cowboy
  • *****
  • Posts: 63
Re: PHPMailer and AddOn Domain
« Reply #2 on: May 20, 2015, 02:21:03 PM »
Do you also get a bounce back by any chance here?

 

Share |