Re: smtp auth login
- From: Bent Stigsen <ngap@xxxxxxxxxx>
- Date: Tue, 19 Apr 2005 22:56:33 +0200
Pasquale wrote:
Bent Stigsen wrote:
Pasquale wrote: [snip]
Can anyone tell me what they possibly think the server responses (below) mean?
[snip]
### code $connection = fsockopen("mail.mydomain.com", 25, $errno, $errstr, 10); fwrite($connection,"EHLO mydomain.com\r\n"); $line = fgets($connection, 1024)." ehlo<BR>\n";
fwrite($connection,"AUTH LOGIN\r\n"); $line .= fgets($connection, 1024)." auth<BR>\n";
[snip]
### server responses
220 mark01.mydomain.local Microsoft ESMTP MAIL Service, Version: 5.0.2195.6713 ready at Mon, 18 Apr 2005 18:20:50 -0600 ehlo
250-mark01.mydomain.local Hello [12.34.567.4] auth
250-TURN user
250-ATRN pass
250-SIZE mail from
250-ETRN rcpt to
250-PIPELINING data
Looks like normal greeting from the Exchange server. AFAIK, it is default behavior for it, to spam its ESMTP verbs on you.
With regards to your code, you are sending commands while it is still responding to your first command.
/Bent
Thanks, but shouldn't the response codes for auth and user be 334, and for pass 235? I'm not receiving the test messages. When I was testing without auth login it was working fine. Could it be the user name??
this line...
>>> 250-mark01.mydomain.local Hello [12.34.567.4]
....is not a response to your "AUTH LOGIN" request, but it is part of the response to "EHLO".
this line... >>> 250-TURN ....is not a response to "USER", but is still part of the response to "EHLO".
Try do it manually with telnet, you'll see what I mean.
My guess is that the response to "AUTH LOGIN" is a 504. But I dont understand, if it indeed works without auth login, why it doesn't work even if the authentication method is rejected. I would expect it to just be ignored.
I know it is more fun to do it yourself, but there are different smtp implementations for PHP, which you can use.
Manuel Lemos has written one, then there is the Pear-package, and probably more if you look around.
http://www.phpclasses.org/smtpclass http://pear.php.net/package/Net_SMTP
/Bent .
- References:
- smtp auth login
- From: Pasquale
- Re: smtp auth login
- From: Bent Stigsen
- Re: smtp auth login
- From: Pasquale
- smtp auth login
- Prev by Date: forum problem...
- Next by Date: php grep
- Previous by thread: Re: smtp auth login
- Next by thread: Re: smtp auth login
- Index(es):
Relevant Pages
|