Skip to main content
Help Center
The GoDaddy Community will undergo maintenance starting on Wednesday, July 28th at 3pm PST / 6pm EST. Learn more
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sending Email through Phpmailer

Hello, I created new email ( I m using Phpmailer to send email from my website to user email account, but it gives me SMTP error, mean their some sort of error in email server. I search for solution they said talk with support and they will add MX Record.

My Email :

Outgoing Server :

SMTP: Port 465

Please help me to solve the solution, Thanks.

Helper V



Hi there,

A couple of mine work with outgoing as .

Maybe this will help you too......

Mrsroadrunner Photography

Hello, Thanks for Reply

Still not working. And how to add MX Records.




Hi there,

From my server, which should not be to different from anything else...... add your domain name with a period at the end, so Select mx - priority is what ever you want it to be (mine is 0 )....

then your outgoing server.... in godaddy they have "tools" there in email (go to your email), then "email setup center", where this information is.... copy that and put it where it goes, on mine it is the last box...... add a "."  on the end.... so

sorry everything is pointing to my server so i can not use the godaddy dns templates and i forget what that looks like..... should not be to different though .....


Mrsroadrunner Photography

Thanks for Reply.

This is what i finally find. But i don't know what to write in fields. Please help me to add the MX Record correctly. 



My Domain :

Secure SSL/TLS Settings
Password: Use the email account’s password.
Incoming Server:
IMAP Port: 993
POP3 Port: 995
Outgoing Server:
SMTP Port: 465


Now, please explain me what to write in Host, Points to, Priority and TTL.





Morning from Oregon USA 🙂

Since images are worth a 1000 words, I took a snap shot of things. I personally find this way easier.......

Now to get them to show in here haha

This is the interface of one of my php emails, this is a custom made job i bought from a fellow so it more then likely will look different then yours?



This is where I got my info to put into the php email. This is provided by godaddy , tools / email setup settings. take note, incoming and outgoing are different .....


email 2.jpg


This is my server settings, and I see I explained things real badly... but a image is much better then words;


If raw code would be easier let me know k -

Hopefully the images do a better job then my words..... and the images come through in here ok

Mrsroadrunner Photography


Note the outgoing smtp server this will be your host

Use below settings for phpmailer to work:

          //$mail->SMTPDebug = 4;
          $mail->Host = '';
          $mail->SMTPAuth = true;
          $mail->SMTPSecure= false;    
          $mail->Username = "your godaddy email not cpanel email";
          $mail->Password = "your godaddy email password";
          $mail->Port = 80;

everything work fine after this, after 3 weeks of headbanging this worked for me perfectly


Wow, godaddy is a beast. Here is what worked for me. This is a sendmail script that includes phpmailer etc. Im still using the older worsk space email and not familiar with the new cpanel so this solution probably will work for older accounts like mine.



function sendmail($to,$subject,$message,$name)



$mail = new PHPMailer();

$mail -> SMTPDebug = 1;
$mail->Host = "";
$mail->SMTPAuth = SMTP_AUTH;
$mail->Port = 80;
$mail->Username = "";
$mail->Password = "***************";
//$mail->SMTPSecure = 'ssl';
$mail->SetFrom('', 'Cagney');
$mail->Subject = $subject;
$body = $message;
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
$address = $to;
$mail->AddAddress($address, $name);
if(!$mail->Send()) {
return 0;
} else {
return 1;



I am facing the same problem now. If you get the answer of this please answer me.