Showing results for 
Show  only  | Search instead for 
Did you mean: 

Still can’t set SMTP setting right despite contacting GoDaddy customer service

Hello all. My company adopts Godaddy’s mail service from office365. Recently, my company develop a website, where we add sending-mail function to enable our client can reset password if he or she forget the password to log in the website. However, we still can send the mail to our client now. We currently uses php language to construct the website and it seems that we don’t get SMTP setting right. Some GoDaddy service agent says port should be 25 instead of 587 and others say SMTP server is or instead of We have tried many version but still can’s successfully send out the mail. Hopefully, someone may know what’s wrong with our code as below. 


We use two methods to send the mail as below:

  1. XAMPP php built-in mail() function

(codes are labeled 1,2,3 as following pics)




  1. Add PHPmailer (codes are labeled as below)



$mail = new PHPMailer(true);


// Send mail using Godaddy MAIL

if($send_using_ Godaddy MAIL){

    $mail->IsSMTP(); // telling the class to use SMTP

    $mail->SMTPAuth = true; // enable SMTP authentication

    $mail->SMTPSecure = "ssl"; // sets the prefix to the server

    $mail->Host = ""; // sets Godaddy MAIL as the SMTP server

    $mail->Port = 25; // set the SMTP port for the Godaddy MAIL server

    $mail->Username = "mail"; // username

    $mail->Password = "password"; // password



// Typical mail data

$mail->AddAddress($email, $name);

$mail->SetFrom($email_from, $name_from);

$mail->Subject = "My Subject";

$mail->Body = "Mail contents";




    echo "Success!";

} catch(Exception $e){

    // Something went bad

    echo "Fail :(";






 Hope someone can know which part is wrong. Thank you:)php_ini.pngsendmail_ini_.pngsendmail_php_.png