Swift Connection

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
lore80281
Forum Newbie
Posts: 1
Joined: Fri Nov 07, 2008 4:22 am

Swift Connection

Post by lore80281 »

Hi....
I have a problem with Swift Class...for send email from action.
In my Action i have the code:

Code: Select all

 
$swift = new Swift(new Swift_Connection_SMTP('out.alice.it'));
$message = new Swift_Message();
$message->setTo($user->getEmail());
$message->setSubject($subject);
$message->setFrom("myemail@alice.it");
$message->setBody('bla bla bla');
$swift->send($message, $user->getEmail(), "myemail@alice.it");
 
Now, if the email of the recipient ($user->getEmail()) is alice.it domain....it's ok....the email is send.
else i have this error:

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)

why????? Sad Sad Sad

please help me....

I have trie to use

Code: Select all

 
$swift = new Swift(new Swift_Connection_NativeMail());
 
the action it's ok and don't show any error but email not sent.
Post Reply