cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
New

PHP Emails not send to other providers

I run into a similar problem like here: https://www.godaddy.com/community/Managing-Email-and-Other-Office/I-am-a-developer-trying-to-send-em...

 

So, I try to send email via a PHP script. This is quite essential, because we need to send verification emails, passwords and stuff to new users.

 

I use PHPMailer and do authenticate, here is the part of my script:

$phpmailer->isSMTP()
$phpmailer->Host = 'a2plcpn#####.prod.iad2.secureserver.net';
$phpmailer->SMTPAuth = true;
$phpmailer->Port = 465;
$phpmailer->Username = '#####';
$phpmailer->Password = '#####';
$phpmailer->SMTPSecure = 'ssl';
$phpmailer->From = '#####';
$phpmailer->FromName= '#####';

This works fine for the email address, we have registered together with the domain. Emails are send immediately. But it seems like GoDaddy does not send to other domains or something.

 

We do not get any error messages by PHPMailer, the emails just never reach their target. We have tried several addresses, some of which we have complete server access and of course, we checked the spam boxes too 🙂

 

What (else) can we do or what are we missing? We need the ability to send people emails automatically in order to run our service.

 

We created our GoDaddy account yesterday and use Deluxe Linux Hosting with cPanel.

 

Thanks in advance 🙂

2 ACCEPTED SOLUTIONS
Community Manager

Hey @David1. Welcome to GoDaddy Community! 

 

I haven't seen anyone try to send email using port 465. Generally we advise that you use port 25 and use the host "localhost" rather than the actual mail server. I'd suggest giving that a try to see if it helps. 

 

Does anyone else in the community have experience with this? 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.

View solution in original post

The solution is to use the "localhost" server. When using this, no account info is required, so those two lines can be commented out.

View solution in original post

6 REPLIES 6
Community Manager

Hey @David1. Welcome to GoDaddy Community! 

 

I haven't seen anyone try to send email using port 465. Generally we advise that you use port 25 and use the host "localhost" rather than the actual mail server. I'd suggest giving that a try to see if it helps. 

 

Does anyone else in the community have experience with this? 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.

View solution in original post

Hi @JesseW!

Sorry for the late reply, this worked! Thanks a lot for your help and sorry again for not coming back earlier!

Hai.. iam using the following code

 

$phpmailer = new PHPMailer;

$phpmailer->isSMTP();
$phpmailer->Host = 'localhost';
$phpmailer->SMTPAuth = true;
$phpmailer->Port = 25;
$phpmailer->Username = 'mail@myregisteredomain';
$phpmailer->Password = 'thepasswordisetforthatdomain';
$phpmailer->SMTPSecure = 'ssl';
$phpmailer->From = 'mail@myregistereddomain';
$phpmailer->SMTPSecure = 'ssl';

But i get this 

Mailer Error: SMTP connect() failed

Curious if you have found a solution to this.  I'm also trying to use a PHP script to send e-mail from my contact form.  Please advise via return post if you've found a solution.

Hey @DriWashSolution,

Are you also trying to send mail from a specific port setting? Have you tried using the settings specified by JessieW?

 

CG - GoDaddy | Community Moderator
24/7 support available at x.co/247support

The solution is to use the "localhost" server. When using this, no account info is required, so those two lines can be commented out.

View solution in original post