Hi, I have been trying to get phpmailer to work for me. My host (Godaddy) has provided me with the server to use, my code is all right and I am just plain out of ideas. I keep getting the error: Message was not sent.Mailer error: SMTP Error: The following SMTP Error: Data not accepted

I REALLY don't understand this, I am using port 25 (which works well with Thunderbird), the server is correct, the email addreses are correct....I'm just clueless now. If someone could help me I would REALLY appreciate it!

Here is the code I have:

<?PHP     
require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "relay-hosting.secureserver.net"; // SMTP server $mail->From = "this@that.biz";
$mail->AddAddress("tester@yahoo.com"); $mail->Subject = "First PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->WordWrap = 50; if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
?>

    Usually if using SMTP you need to supply a SMPT account user and password, e.g.:

    $mail->IsSMTP();  // telling the class to use SMTP  
    $mail->Host = "relay-hosting.secureserver.net"; // SMTP server
    $mail->User = "username"; $mail->Password = "password";

      Thank you for replying. My host doesn't require a log in for this SMTP connection. Here is what they said in the email to me:

      Please note that you should not be using smtpout.secureserver.net when sending email from your Hosting plan. You should instead be using relay-hosting.secureserver.net. This server allows up to 1000 relays per day, and does not require that you provide a username or password.

      Is there anything you can think of that might be wrong. I DID take the time to try the user name and password anyway, still no luck.

        Does the SMTP host require that you use a specific email address as your "From" address?

          Is there a reason why you reposted this when you already have this thread running in an unresolved state?

          Again, it looks like the relay server GoDaddy is directing you to use isn't SMTP authenticated. You can't use the SMTP authenticated portion of PHPMailer to connect to a non-SMTP/non-authenticated account.

          Please don't double-post when you have people reviewing and providing feedback to you in another thread!

            Thank a lot for all your time ad assistance! I am terribly sorry for he double post, it will not happen again.

              This is probably going to be one of the most boneheaded revelations you will ever read in this forum. I thought there was a chance you might like to know. I have finally solved my php email dilemma. All I had to do is upload the files to the server! I had been making little appz and testing them on my local machine with decent success so it didn't occur to me that I would have to have the files literally on my actual web site.

              Idiot? maybe. Educated? definitely!

              Thanks again for all your help!

                Write a Reply...