Has anyone figured out how to get phpMailer to work in Godaddy or a workaround

I’ve been struggling for the past 3 days trying to get my php code for sending a confirmation email to users once they sign up but I just can’t seem to get it right. I’ve digged the internet for answers but just can’t find it. Does anyone happen to know how to get it to work in Godaddy specifically.
Thanks in advance

I’m not sure that Godaddy hosting will have any specific differences in the set up. Just one site that I manage is on Godaddy and it used PHPmailer just the same os those on other hosts.

What specific errors are you getting?
How are you installing, with Composer or manual includes?

There is another recent topic about setting up PHPmailer.

That’s part of the problem, I’m not getting any errors and I installed it manually. Is there anything I should be tweaking?

I’ll try this and get back to you if I’m successful or not

Do you definitely have error reporting on?

The only host specific problem I know with mail is that some hosts won’t let you post mail where the “from address” does not belong to your domain, because it could be used for spoofing. So do ensure that is the case. You can always have the “reply to” address as something else if it suits your needs.

GoDaddy servers arent sendmail compliant, so far as I know. You’d have to have an email setup on your account authorized to act as an SMTP relay, and tell PHPMailer to bounce out through that.
See this godaddy support post for applicable settings (2017). Note that if you’re using cPanel for your email you should look a bit further down the thread.

That’s the exact thread I initially started with but no luck. I feel like the coding there is pretty perfect now. The error I now see after all my adjustments is that: SMTP Connect() failed.
And that there’s a broken pipe in the smtp.php.
Does that mean there’s something wrong with the phpMailer set up?

Have you got verbose error debugging set?

$mail->SMTPDebug = 3;

I have it set to 2. I just made the change to 3 and nothing changed. I’m going to investigate what broken pipe it could be referring to and get back with what I find.

I am with @m_hutley on this one. You are required to have an authorized email that’s setup with your mailing server on GoDaddy. If you don’t own an email that you have setup on GoDaddy, I don’t believe this will work. My initial post from last year was quite on point I believe. Most popular hosters now are taking action. Important Update: Managing email addresses for PHP/ASP mail scripts! - whois.com's friendly reminder

If you already own an email that you have created from GoDaddy’s control panel and it is a working email. Then you will have to figure out why it’s not sending emails through. I have had this issue before with my hoster, but that was only because they were switching mail servers. So they had changed the main outgoing server and have ported my actual domain with the subdomain mail.___.__ so that I only need to use that as outgoing server instead of theirs.

I honestly think you should be testing on a localhost first before you start doing it on live servers. You should never have to do it via live.

That is one of the advantages of using PHPMailer over PHP’s mail() function in that you don’t need to set up a local mail server.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.