-1

I'm on GoDaddy and have PHPMailer setup with the following settings:

$mail->SMTPDebug = SMTP::DEBUG_SERVER;
$mail->SMTPDebug = 2; 
$mail->isSMTP();
$mail->Host = 'relay-hosting.secureserver.net';
$mail->SMTPAuth = false;
$mail->SMTPAutoTLS = false; 
$mail->Port = 25; 

I have another area of the website where the mailer is working just fine. On this specific part which is a password reset, everything seems to be working fine - as evidenced by the logs but no email is actually sent.

SMPT Debug Logs show

2023-08-11 18:05:35 SERVER -> CLIENT: 220 p3nlsmtp18.shr.prod.phx3.secureserver.net : HOSTING RELAY : ESMTP Grid hosting relay server ready
2023-08-11 18:05:35 CLIENT -> SERVER: EHLO www.mflhistory.com
2023-08-11 18:05:35 SERVER -> CLIENT: 250-p3nlsmtp18.shr.prod.phx3.secureserver.net hello [10.199.64.96], pleased to meet you250-HELP250-SIZE 50000000250-ENHANCEDSTATUSCODES250-8BITMIME250-STARTTLS250 OK
2023-08-11 18:05:35 CLIENT -> SERVER: MAIL FROM:<kevin@mflhistory.com>
2023-08-11 18:05:35 SERVER -> CLIENT: 250 2.1.0 <kevin@mflhistory.com> sender ok
2023-08-11 18:05:35 CLIENT -> SERVER: RCPT TO:<kevin.desilva@gmail.com>
2023-08-11 18:05:35 SERVER -> CLIENT: 250 2.1.5 <kevin.desilva@gmail.com> recipient ok
2023-08-11 18:05:35 CLIENT -> SERVER: DATA
2023-08-11 18:05:35 SERVER -> CLIENT: 354 OK
2023-08-11 18:05:35 CLIENT -> SERVER: Date: Fri, 11 Aug 2023 18:05:35 +0000
2023-08-11 18:05:35 CLIENT -> SERVER: To: kevin.desilva@gmail.com
2023-08-11 18:05:35 CLIENT -> SERVER: From: MFLHistory Admin <kevin@mflhistory.com>
2023-08-11 18:05:35 CLIENT -> SERVER: Reply-To: kevin.desilva@gmail.com
2023-08-11 18:05:35 CLIENT -> SERVER: Subject: MFLHistory password reset
2023-08-11 18:05:35 CLIENT -> SERVER: Message-ID: <1mAbcGm3NHMG35eeDwNWOc7eZpiUAv6IpD6Jtmbw@www.mflhistory.com>
2023-08-11 18:05:35 CLIENT -> SERVER: X-Mailer: PHPMailer 6.6.3 (https://github.com/PHPMailer/PHPMailer)
2023-08-11 18:05:35 CLIENT -> SERVER: MIME-Version: 1.0
2023-08-11 18:05:35 CLIENT -> SERVER: Content-Type: multipart/alternative;
2023-08-11 18:05:35 CLIENT -> SERVER: boundary="b1_1mAbcGm3NHMG35eeDwNWOc7eZpiUAv6IpD6Jtmbw"
2023-08-11 18:05:35 CLIENT -> SERVER: Content-Transfer-Encoding: 8bit
2023-08-11 18:05:35 CLIENT -> SERVER:
2023-08-11 18:05:35 CLIENT -> SERVER: This is a multi-part message in MIME format.
2023-08-11 18:05:35 CLIENT -> SERVER:
2023-08-11 18:05:35 CLIENT -> SERVER: --b1_1mAbcGm3NHMG35eeDwNWOc7eZpiUAv6IpD6Jtmbw
2023-08-11 18:05:35 CLIENT -> SERVER: Content-Type: text/plain; charset=us-ascii
2023-08-11 18:05:35 CLIENT -> SERVER:
2023-08-11 18:05:35 CLIENT -> SERVER: You have been sent this email because we received a request to reset the password to your MFLHistory account.
2023-08-11 18:05:35 CLIENT -> SERVER:
2023-08-11 18:05:35 CLIENT -> SERVER: --b1_1mAbcGm3NHMG35eeDwNWOc7eZpiUAv6IpD6Jtmbw
2023-08-11 18:05:35 CLIENT -> SERVER: Content-Type: text/html; charset=us-ascii
2023-08-11 18:05:35 CLIENT -> SERVER:
2023-08-11 18:05:35 CLIENT -> SERVER: <h2>Hello!</h2><p>Forgotten your password?</p>
2023-08-11 18:05:35 CLIENT -> SERVER: <p>You have been sent this email because we received a request to reset the password to your MFLHistory account.</p>
2023-08-11 18:05:35 CLIENT -> SERVER: <p>To do this, please click the button below to enter a new password of your choice.</p>
2023-08-11 18:05:35 CLIENT -> SERVER: <p>Regards,</p>
2023-08-11 18:05:35 CLIENT -> SERVER: <p>MFLHistory Support</p><p><a href='https://www.mflhistory.com/admin/reset-password.php?key=kevin.desilva@gmail.com&token=d5fd882b2d057b4d243cdcd61bd3a7c96290'>Click To Reset password</a></p>
2023-08-11 18:05:35 CLIENT -> SERVER:
2023-08-11 18:05:35 CLIENT -> SERVER:
2023-08-11 18:05:35 CLIENT -> SERVER: --b1_1mAbcGm3NHMG35eeDwNWOc7eZpiUAv6IpD6Jtmbw--
2023-08-11 18:05:35 CLIENT -> SERVER:
2023-08-11 18:05:35 CLIENT -> SERVER: .
2023-08-11 18:05:35 SERVER -> CLIENT: 250 2.0.0 UWVzqZNVaBBz1UWVzqJjBl mail accepted for delivery
2023-08-11 18:05:35 CLIENT -> SERVER: QUIT
2023-08-11 18:05:35 SERVER -> CLIENT: 221 2.0.0 p3nlsmtp18.shr.prod.phx3.secureserver.net : HOSTING RELAY : closing connection

But at the end of the day, no email actually gets sent....

Kevin
  • 565
  • 12
  • 25
  • 1
    Sounds more like a mailing problem to me than a programming or software development related question. Maybe @Synchro spots something in the logs, but I don't see a connection with Phpmailer even. According to the logs, the relay accepted the message for delivery. Contact the relay and ask about the transfer. – hakre Aug 11 '23 at 18:40
  • GMail is picky about the mailservers it wants to receive mail from. Did you set up SPF and DKIM? See; [Prevent spam, spoofing & phishing with Gmail authentication](https://support.google.com/a/answer/10583557?sjid=13651906606843295600-EU). – KIKO Software Aug 11 '23 at 18:41
  • 1
    @hakre is right - this all looks like a successful send, or at least a successful submission to GoDaddy's mail server. I looked at your SPF and that looks OK too. If it gets bounced later, you should receive a message saying so on your `kevin@` address, but bear in mind that this email, so that might not happen for a few days! You are using an old version of PHPMailer, but I doubt that has any impact on this. – Synchro Aug 11 '23 at 21:14
  • @Synchro Hey Synchro thanks for taking a look (and really thanks for creating this!). So I've actually found a fix, which crazily enough was just taking out this line: $mail->isSMTP(); Everything works after that... – Kevin Aug 12 '23 at 02:10
  • OK, that means it falls back to PHP's mail() function, though you should be able to use SMTP to localhost [as per the docs](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#godaddy), which is marginally safer and faster. – Synchro Aug 15 '23 at 15:05

0 Answers0