PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old April 2nd, 2009, 11:51 AM
sahitau sahitau is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 1 sahitau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 33 sec
Reputation Power: 0
Exclamation PEAR/MAIL SMTP emailing - TLS Error

Hi everyone,

I am having issue with sending email through 1and1 SMTP using PEAR MAIL package. I am using Windows server + WAMP.

Code:
HERE is code (trying to send email to myself:)
include("Mail(dot)php");
/* mail setup recipients, subject etc */
$recipients = "website@s243470074(dot)onlinehome(dot)us";
$headers["From"] = "website@s243470074(dot)onlinehome(dot)us";
$headers["Reply-To"] = "website@s243470074(dot)onlinehome(dot)us";
$headers["To"] = "website@s243470074(dot)onlinehome(dot)us";
$headers["Subject"] = "Just testing email";
$mailmsg = "Test email";
/* SMTP server name, port, user/passwd */
$smtpinfo["host"] = "smtp(dot)1and1(dot)com> ";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "website@s243470074(dot)onlinehome(dot)us";
$smtpinfo["password"] = "realpassword";
$smtpinfo["timeout"] = 5;
$smtpinfo["debug"] = true;

/* Create the mail object using the Mail::factory method */
$mail_object =& Mail::factory("smtp", $smtpinfo);
/* Ok send mail */
$error = $mail_object->send($recipients, $headers, $mailmsg);
if (PEAR::isError($error)) { print($error->getMessage());}
 

Here is LOG:
DEBUG: Recv: 220 smtp(dot)perfora(dot)net <(URL address blocked: See forum rules)>  (mrus1) Welcome to Nemesis ESMTP server DEBUG: Send: EHLO localhost DEBUG: Recv: 250-mrus1(dot)perfora(dot)net <(URL address blocked: See forum rules)> DEBUG: Recv: 250-STARTTLS DEBUG: Recv: 250-AUTH LOGIN PLAIN DEBUG: Recv: 250-AUTH=LOGIN PLAIN DEBUG: Recv: 250-PIPELINING DEBUG: Recv: 250-SIZE 100000000 DEBUG: Recv: 250 HELP DEBUG: Send: STARTTLS DEBUG: Recv: 220 Go ahead DEBUG: Send: RSET  authentication failure [SMTP: STARTTLS failed (code: 220, response: Go ahead)]
AUTH: 1DEBUG: Send: QUIT DEBUG: Recv: 454 TLS negotiation failed 
 

It looks like the problem is with TLS connection. 1and1 uses secure connection to regular port (STARTTLS), but it looks like PEAR MAIL uses secure connection to dedicated port (TLS).

I spent lots of time trying to debug this issue. Search lots of stuff on Google and still no good result.

I will appreciate any help!
Thanks.

Reply With Quote
  #2  
Old April 22nd, 2009, 05:28 AM
ForcesResources ForcesResources is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 2 ForcesResources User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 10 sec
Reputation Power: 0
Hi,

I too am having trouble sending smtp mail through my 1 and 1 account and I am getting the same error message
Code:
authentication failure [SMTP: STARTTLS failed (code: 220, response: Go ahead)]


Could you tell me if you managed to get this issue solved and if you did would you be so kind as to help me out with a solution.

Heres hoping.

Reply With Quote
  #3  
Old April 22nd, 2009, 12:18 PM
ForcesResources ForcesResources is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 2 ForcesResources User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 10 sec
Reputation Power: 0
A bit of debugging.

When I run it with PHP PEAR Mail.php set to debug I get
Code:
DEBUG: Recv: 220 auth.smtp.oneandone.co.uk (mreu1) Welcome to Nemesis ESMTP server
DEBUG: Send: EHLO forcesresources.co.uk

DEBUG: Recv: 250-mreu1.kundenserver.de
DEBUG: Recv: 250-STARTTLS
DEBUG: Recv: 250-AUTH LOGIN PLAIN
DEBUG: Recv: 250-AUTH=LOGIN PLAIN
DEBUG: Recv: 250-PIPELINING
DEBUG: Recv: 250-SIZE 100000000
DEBUG: Recv: 250 HELP
DEBUG: Send: STARTTLS

DEBUG: Recv: 220 Go ahead
DEBUG: Send: RSET

DEBUG: Recv: 454 TLS negotiation failed

authentication failure [SMTP: STARTTLS failed (code: 220, response: Go ahead)]

DEBUG: Send: QUIT 

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > PEAR/MAIL SMTP emailing - TLS Error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
Stay green...Green IT