Skip to content
Advertisement

PHPMailer doesnt seem to work with Hostgator Hosting

I am using PHPMailer on core PHP with Hostgator hosting business account and im getting the following error in SMTPDebug:

JavaScript

the first line of the log says We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. but at the same time PHPMailer is giving me response Mail sent.

What could be the issue here and how do i resolve it?

Also instead of my@emailaddress.com and domainname.com I’ve used my actual email address and actual website address. Just writing this here, apparently people point out the weirdest stuff here lol.

edit

Please find the php code below:

JavaScript

** UPDATE **

I’ve received bounced back email on donotreply@domainname.com with the following error:

JavaScript

Advertisement

Answer

The issue was basically with the newly created email donotreply@domainname.com itself. The first two email addresses that were tested using PHPMailer bounced back in the inbox. If you are facing exactly the same issue as myself then i’d suggest you go through the following troubleshooting:

Make sure that Debug is not set to 0

$mail->SMTPDebug = 2

Test your code and check if PHPMailer is firing success at the end.

Check if PHPMailer echoes SUCCESS

As pointed out by @ADyson the following error/notice does not mean that the PHPMailer is not working.

SERVER -> CLIENT: 220-gator4001.hostgator.com ESMTP Exim 4.92 #2 Mon, 13 Jan 2020 07:16:54 -0600 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.

Secondly test your code by sending email to different domains on different servers

Test sending email to Gmail, Hotmail, Yahoo, Other Emails hosted on another server.

Check your inbox for any bounced back messages.

If you’ve received a bounced back message; It is certain that PHPMailer is working fine.

Contact your Host for more details by providing them with error details in the bounced email.

My issue was resolved by hostgator because the email to few email addresses would bounce back while it worked perfectly fine with Gmail and Hotmail

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement