SMTP auth failure
Posted: Fri Sep 28, 2007 4:40 pm
I'm having problems with SMTP authentication.
Redhat Fedora
Apache 2.2.2
PHP 5.1.6
SwiftMailer 3.3.1
ESMTP Sendmail 8.13.8/8.13.5
sendmail:
the script
log dump
..and yes, the username and password are correct ...I can send emails through a webmail client (using the same smtp) thought:)
The handshake procedure goes well and swift returns hashed string but still...something is wrong :/
Do I have to alter sendmail conf file in order to make it work?
cheers
Redhat Fedora
Apache 2.2.2
PHP 5.1.6
SwiftMailer 3.3.1
ESMTP Sendmail 8.13.8/8.13.5
sendmail:
Code: Select all
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBYCode: Select all
$message = new Swift_Message($sSubject, $sMessage, "text/html");
$log = Swift_LogContainer::getLog();
$log->setLogLevel(4);
try {
$smtp = new Swift_Connection_SMTP("1www", 25);
$smtp->setUsername("foo");
$smtp->setpassword("bar");
$swift = new Swift($smtp);
$log = Swift_LogContainer::getLog();
echo $log->dump(true);
}
catch (Swift_ConnectionException $e) {
echo "There was a problem communicating with SMTP: " . $e->getMessage();
} catch (Swift_Message_MimeException $e) {
echo "There was an unexpected problem building the email:" . $e->getMessage();
}
if ($swift->send($message, $sFriendEmail, "foo@novaraja.com"))
{
echo "Message sent";
}
else
{
echo "Message not sent!";
}
$swift->disconnect();Code: Select all
++ Log level changed to 4
++ Forcing ESMTP mode. HELO is EHLO.
++ Forcing ESMTP mode. HELO is EHLO.
++ Trying to connect...
++ Trying to connect to SMTP server at '1www:25
<< 220 www.novaraja.com ESMTP Sendmail 8.13.8/8.13.5; Fri, 28 Sep 2007 23:32:44 +0200
>> EHLO [217.198.148.239]
<< 250-www.novaraja.com Hello 2www [217.198.148.239], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
++ SMTP extension 'ENHANCEDSTATUSCODES' reported with attributes [].
++ SMTP extension 'PIPELINING' reported with attributes [].
++ SMTP extension '8BITMIME' reported with attributes [].
++ SMTP extension 'SIZE' reported with attributes [].
++ SMTP extension 'DSN' reported with attributes [].
++ SMTP extension 'AUTH' reported with attributes [DIGEST-MD5, CRAM-MD5].
++ SMTP extension 'DELIVERBY' reported with attributes [].
++ SMTP extension 'HELP' reported with attributes [].
++ Trying to authenticate with username 'registracija'.
++ No authenticators loaded; looking for defaults.
++ Authentication mechanism 'CRAM-MD5' attached.
++ Authentication mechanism 'LOGIN' attached.
++ Authentication mechanism 'PLAIN' attached.
++ Trying 'CRAM-MD5' authentication...
>> AUTH CRAM-MD5
<< 334 PDMyMjQ1MDk0MDAuMTY2MTAxMTRAd3d3Lm5vdmFyYWphLmNvbT4=
>> cmVnaXN0cmFjaWphIDg2ODBkMDUzNTJhMDUxYjgxZTg0OGEwYThhOWQ3YTAy
<< 535 5.7.0 authentication failed
!! Expected response code(s) [235] but got response [535 5.7.0 authentication failed]
>> RSET
<< 250 2.0.0 Reset stateThe handshake procedure goes well and swift returns hashed string but still...something is wrong :/
Do I have to alter sendmail conf file in order to make it work?
cheers