Jump to content

SMTP Error: Could not authenticate


ozman26

Recommended Posts

Hi Guys,

I have a small problem which I cannot figure out, but taking my chances with you here. I have the same php script installed on my laptop and on a desktop. If it runs from the laptop, mail goes out and received. If I send it from the desktop, I get a SMTP Error: Could not authenticate notification along with Warning: Cannot modify header information - headers already sent .....

 

Below is part of the script. Can someone shed some light why one would work and not the other if both are configured the same. Thank-you in advance.

 

require("class.phpmailer.php");

$mail=new PHPMailer();

$mail->IsSMTP();

$mail->Host = "smtphm.XXXXXX.XX";

$mail->SMTPAuth = true;

$mail->Username = "XXX";

$mail->Password = "XXXX";

$mail->From = "webmaster@XXXX.XX";

$mail->FromName ="XXXXX";

$mail->AddAddress("$feedbackemail","$feedbackname");

$mail->WordWrap = 50;

$mail->IsHTML(true);

 

I also put in $mail->SMTPDebug = 2; to see the actual message and this is what he provides me.

 

SMTP -> FROM SERVER:220 BLU0-SMTP73.blu0.hotmail.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at Mon, 26 Apr 2010 18:22:40 -0700

SMTP -> FROM SERVER: 250-BLU0-SMTP73.blu0.hotmail.com Hello [70.31.211.52] 250-TURN 250-SIZE 35840000 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-TLS 250-STARTTLS 250 OK

SMTP -> ERROR: AUTH not accepted from server: 530 5.7.0 Must issue a STARTTLS command first

SMTP -> FROM SERVER:530 5.7.0 Must issue a STARTTLS command first

SMTP -> ERROR: RSET failed: 530 5.7.0 Must issue a STARTTLS command first

SMTP Error: Could not authenticate.

 

My ISP requires authentication now, but didn't before. the mail() command was working fine. As mentioned, the laptop contains the same script and it works flawlessly. I've checked high and low but cannot figure out what to do.

 

Thank you in advance.

 

Link to comment
Share on other sites

Yes, but is it actually being loaded? What does a phpinfo(); statement show? There should be a whole section listed (not to be confused with any openssl listed for your web server) -

 

openssl

OpenSSL support enabled

OpenSSL Library Version OpenSSL 0.9.8k 25 Mar 2009

OpenSSL Header Version OpenSSL 0.9.8l 5 Nov 2009

Link to comment
Share on other sites

Openssl is activated, still a no go. Getting. Now what?

 

 

SMTP -> FROM SERVER:220 BLU0-SMTP47.blu0.hotmail.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at Mon, 26 Apr 2010 19:39:20 -0700

SMTP -> FROM SERVER: 250-BLU0-SMTP47.blu0.hotmail.com Hello [70.31.211.52] 250-TURN 250-SIZE 35840000 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-TLS 250-STARTTLS 250 OK

SMTP -> ERROR: AUTH not accepted from server: 530 5.7.0 Must issue a STARTTLS command first

SMTP -> FROM SERVER:530 5.7.0 Must issue a STARTTLS command first

SMTP -> ERROR: RSET failed: 530 5.7.0 Must issue a STARTTLS command first

SMTP Error: Could not authenticate.

Link to comment
Share on other sites

Thanks cags,

 

That did the trick, however I had to re-install Apache/PHP5/MySQL for it to work. Strange that the laptop I did not have to use $mail->SMTPSecure = "tls" but on the actual server I did. The only difference I see between the laptop and the server is the OS. Laptop = Vista and the Server = WinXP SP2.

 

As long as it works I'm okay, but I'd still like to know if this is what caused it in the first place.

 

Thanks to all for you help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.