GoDaddy > mail() not sending emails … solved! [20SEP2014]

To Solve …

Like me you may of been using the `mail` command for years without a hitch … until you found that sent emails, never arrived!. So, please ditch the `mail()` command and the steps below will get your email working again !

1) Download and unpack PHPMailer v.5.2.4 from here :

2) In my example, PHPMailer exists in :


3) Copy and paste the script below into a file called /testemail.php

// error_reporting(4);
// error_reporting(E_ALL);

require 'includes/phpmailer/class.phpmailer.php';


$email = '';

$mail = new PHPMailer();
$mail->SMTPDebug = 1;                 
$mail->SMTPAuth = SMTP_AUTH;
$mail->Host = SMTP_HOST;
$mail->Port = SMTP_PORT;
$mail->Username =  SMTP_USERNAME;
$mail->Password = SMTP_PASSWORD;
$mail->SetFrom(SMTP_USERNAME,'The Debt-Refund Team');
$mail->AddReplyTo(SMTP_USERNAME,'The Debt-Refund Team');
$mail->Subject    = "Thank you for your enquiry ...";
$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!";
$mail->MsgHTML('This is a test.');

* blue text is username/password you use to send emails
* red text is the person you want to email
* green text is your own/company name
* orange text is subject line
* purple text is email message

Run the file – i.e.
after a moment you’ll get a blank page – which means the email has been sent!
If there was a problem sending the email … you’ll see messages on the screen

YES, It Really Does Work :
godaddy mail not working - solved

Loosely based on :

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Anti-Spam by WP-SpamShield