Gentoo Archives: gentoo-user

From: "Marcin Niśkiewicz" <mniskiewicz@××.pl>
To: gentoo-user@l.g.o
Subject: [gentoo-user] problem with pear-mail (probably)
Date: Fri, 04 Apr 2008 07:29:49
Message-Id: 6d2ae6d5.8fbb4ad.47f5d8ec.16d07@o2.pl
1 HelloI 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 fromserver (code: 535, response: 5.7.0 Error: authentication failed:another step is needed in authentication)]When i'm telneting my email server everything seems OKi installed lots of (even unnecessary) pear libraries:dev-php/PEAR-Auth-1.5.4
2 dev-php/PEAR-Auth_SASL-1.0.2
3 dev-php/PEAR-Crypt_CHAP-1.0.1
4 dev-php/PEAR-DB-1.7.12
5 dev-php/PEAR-File_Passwd-1.1.6
6 dev-php/PEAR-File_SMBPasswd-1.0.2
7 dev-php/PEAR-HTTP_Request-1.4.1
8 dev-php/PEAR-Log-1.9.11
9 dev-php/PEAR-MDB-1.3.0-r1
10 dev-php/PEAR-MDB2-2.5.0_alpha1
11 dev-php/PEAR-MDB2_Driver_mysql-1.5.0_alpha1
12 dev-php/PEAR-MDB2_Driver_mysqli-1.5.0_alpha1
13 dev-php/PEAR-MIME_Type-1.0.0
14 dev-php/PEAR-Mail-1.1.14
15 dev-php/PEAR-Mail_Mime-1.3.1-r2
16 dev-php/PEAR-Net_DIME-0.3-r1
17 dev-php/PEAR-Net_DNS-1.0.0
18 dev-php/PEAR-Net_IMAP-1.1.0_beta1
19 dev-php/PEAR-Net_POP3-1.3.6-r1
20 dev-php/PEAR-Net_SMTP-1.2.10
21 dev-php/PEAR-Net_Socket-1.0.8
22 dev-php/PEAR-Net_URL-1.0.15
23 dev-php/PEAR-PEAR-1.6.2-r1
24 dev-php/PEAR-PEAR_Info-1.7.0
25 dev-php/PEAR-SOAP-0.11.0
26 dev-php/PEAR-System_Command-1.0.6
27 dev-php/PEAR-XML_Parser-1.2.8
28 dev-php/PEAR-XML_Util-1.1.4but still it doesn't work...To send mail i'm using such script (it's working):&lt;?PHP
29 function send_mail($mail_text,$sender,$server,$login,$password,$recipient,$subject){
30 require_once 'Mail.php';
31 $params['host'] = $server;
32 $params['port'] = 25;
33 $params['auth'] = true;
34 $params['username'] = $login;
35 $params['password'] = $password;
36 $headers['Subject'] = $subject;
37 #$headers['Message-Id'] = $ticid;
38 $headers['From'] = $login;
39 $headers['X-Abuse-To'] = 'abuse@××××.com';
40 $headers['Content-type'] = 'text/plain; charset=ISO-8859-2';
41 $headers['To'] = $recipient;
42 $body = $mail_text;
43 $recipients = $recipient;
44 $mail = Mail::factory('smtp', $params);
45 if (PEAR::isError($mail)) {
46 print $mail-&gt;getMessage();
47 } else {
48 $error = $mail-&gt;send($recipients, $headers, $body);
49 if (PEAR::isError($error)) {
50 print $error-&gt;getMessage();
51 } else {
52 print 'SUCCESS';
53 }}};
54 ?&gt;I don't have any ideas what to do ...I would appreciate any helpbest regardsnichu