Help in swiftmailer

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
S.Merlin
Forum Newbie
Posts: 3
Joined: Wed Aug 27, 2008 12:37 am

Help in swiftmailer

Post by S.Merlin »

There was a problem reading line 1 of an SMTP response. The response so far was:<br />[]. It

Why I am getting the above error message in swiftmailer?

could you help me out?

Please help me!!
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Help in swiftmailer

Post by onion2k »

Moved to the Swift forum.
S.Merlin
Forum Newbie
Posts: 3
Joined: Wed Aug 27, 2008 12:37 am

Re: Help in swiftmailer

Post by S.Merlin »

Please somebody help me!! :cry:
Trance-formation
Forum Newbie
Posts: 11
Joined: Tue Jul 17, 2007 6:31 am

Re: Help in swiftmailer

Post by Trance-formation »

can you post more details?
mpetrovich
Forum Commoner
Posts: 55
Joined: Fri Oct 19, 2007 2:02 am
Location: Vancouver, WA, USA

Re: Help in swiftmailer

Post by mpetrovich »

I am trying to help someone that is getting the exact same error.

The message he is getting back is:
Fatal error: Uncaught exception 'Swift_ConnectionException' with message 'There was a problem reading line 1 of an SMTP response. The response so far was:<br />[]. It appears the connection has died without saying goodbye to us! Too many emails in one go perhaps? (fsockopen: #0) ' in C:\wamp\www\SwiftMailer\lib\Swift\Connection\SMTP.php:250 Stack trace: #0 C:\wamp\www\SwiftMailer\lib\Swift.php(306): Swift_Connection_SMTP->read() #1 C:\wamp\www\SwiftMailer\lib\Swift.php(386): Swift->command('RCPT TO: <angel...', 250) #2 C:\wamp\www\Sweepstakes Manager\manager\mail\doMail_YDI08_Grand_Swift.php(145): Swift->send(Object(Swift_Message), Object(Swift_RecipientList), Object(Swift_Address)) #3 {main} thrown in C:\wamp\www\SwiftMailer\lib\Swift\Connection\SMTP.php on line 250
He is running this from a local machine, and connecting to an SMTP server.

He is in process of sending out about 8000 messages. About every 100 messages, he gets this error and the system stops. If he just sends the one email that crashed, he will get the same error, so adding a delay does not help. There appears to be some kind of problem with the email response that Swift does not like. Unfortunately, he does not have access to the mail logs, so debugging this has been difficult, and we have not yet figured out a workaround.
mpetrovich
Forum Commoner
Posts: 55
Joined: Fri Oct 19, 2007 2:02 am
Location: Vancouver, WA, USA

Re: Help in swiftmailer

Post by mpetrovich »

Well, the workaround was to comment out the throw exception.

First, note that the <br /> should not be in the error message because the exception appears to output htmlentities.

The response that we were getting back is a '250 ok' message, and sometimes we would get ' 250 ok' with a space. The ones with a space would throw the exception. A fix might be to trim the response message.
jagan_e
Forum Newbie
Posts: 2
Joined: Thu Jul 28, 2011 2:25 am

Re: Help in swiftmailer

Post by jagan_e »

Hi i am facing similar kind of exception. This exception is not coming for gmail, yahoo mail ids and it is coming for other domains.
exception is
Fatal error: Uncaught exception 'Swift_ConnectionException' with message 'There was a problem reading line 1 of an SMTP response. The response so far was:<br />[]. It appears the connection has died without saying goodbye to us! Too many emails in one go perhaps? (fsockopen: #0) <h3>Log Information</h3><pre>++ Log level changed to 2</pre>' in /var/www/html/myrewards/app/vendors/Swift/Connection/SMTP.php:250 Stack trace: #0 /var/www/html/myrewards/app/vendors/Swift.php(306): Swift_Connection_SMTP->read() #1 /var/www/html/myrewards/app/vendors/Swift.php(386): Swift->command('RCPT TO: <danny...', 250) #2 /var/www/html/myrewards/app/controllers/components/swift_mailer.php(299): Swift->send(Object(Swift_Message), Object(Swift_RecipientList), Object(Swift_Address)) #3 /var/www/html/myrewards/app/controllers/components/swift_mailer.php(321): SwiftMailerComponent->send('Rewards One e-N...') #4 /var/www/html/myrewards/app/controllers/newsletters_controller.php(788): SwiftMailerComponent->sendView('Rewards One e-N...', 'newsletter in /var/www/html/myrewards/app/vendors/Swift/Connection/SMTP.php on line 250
Please give me a solution.
Thank you in advance

Jagan
Post Reply