Java Mailing List Archive

http://www.redhatconfig.com/

Home » Gentoo Linux »

[gentoo-user] problem with pear-mail (probably)

Marcin Niƛkiewicz

2008-04-04


Author LoginPost Reply

Hello

I have apache on gentoo installed. Everything seems OK despite that I can't send mail from my site. There's a notice:

authentication failure [SMTP: Invalid response code received from server (code: 535, response: 5.7.0 Error: authentication failed: another step is needed in authentication)]

When i'm telneting my email server everything seems OK

i installed lots of (even unnecessary) pear libraries:

dev-php/PEAR-Auth-1.5.4
dev-php/PEAR-Auth_SASL-1.0.2
dev-php/PEAR-Crypt_CHAP-1.0.1
dev-php/PEAR-DB-1.7.12
dev-php/PEAR-File_Passwd-1.1.6
dev-php/PEAR-File_SMBPasswd-1.0.2
dev-php/PEAR-HTTP_Request-1.4.1
dev-php/PEAR-Log-1.9.11
dev-php/PEAR-MDB-1.3.0-r1
dev-php/PEAR-MDB2-2.5.0_alpha1
dev-php/PEAR-MDB2_Driver_mysql-1.5.0_alpha1
dev-php/PEAR-MDB2_Driver_mysqli-1.5.0_alpha1
dev-php/PEAR-MIME_Type-1.0.0
dev-php/PEAR-Mail-1.1.14
dev-php/PEAR-Mail_Mime-1.3.1-r2
dev-php/PEAR-Net_DIME-0.3-r1
dev-php/PEAR-Net_DNS-1.0.0
dev-php/PEAR-Net_IMAP-1.1.0_beta1
dev-php/PEAR-Net_POP3-1.3.6-r1
dev-php/PEAR-Net_SMTP-1.2.10
dev-php/PEAR-Net_Socket-1.0.8
dev-php/PEAR-Net_URL-1.0.15
dev-php/PEAR-PEAR-1.6.2-r1
dev-php/PEAR-PEAR_Info-1.7.0
dev-php/PEAR-SOAP-0.11.0
dev-php/PEAR-System_Command-1.0.6
dev-php/PEAR-XML_Parser-1.2.8
dev-php/PEAR-XML_Util-1.1.4

but still it doesn't work...

To send mail i'm using such script (it's working):

<?PHP
function send_mail($mail_text,$sender,$server,$login,$password,$recipient,$subject){

require_once 'Mail.php';

$params['host'] = $server;
$params['port'] = 25;
$params['auth'] = true;
$params['username'] = $login;
$params['password'] = $password;

$headers['Subject'] = $subject;
#$headers['Message-Id'] = $ticid;
$headers['From'] = $login;
$headers['X-Abuse-To'] = 'abuse@mail.com';
$headers['Content-type'] = 'text/plain; charset=ISO-8859-2';
$headers['To'] = $recipient;
$body = $mail_text;

$recipients = $recipient;

$mail = Mail::factory('smtp', $params);

if (PEAR::isError($mail)) {

print $mail->getMessage();

} else {
$error = $mail->send($recipients, $headers, $body);
if (PEAR::isError($error)) {

print $error->getMessage();

} else {
print 'SUCCESS';
}

}

};

?>

I don't have any ideas what to do ...

I would appreciate any help

best regards

nichu

©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.