[Done] Swift_TransportException

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
blasil64
Forum Newbie
Posts: 2
Joined: Fri Dec 18, 2009 7:42 am

[Done] Swift_TransportException

Post by blasil64 »

Hi !
I try to send email with the smtp protocol.
This is my code :

Code: Select all

$transport = Swift_SmtpTransport::newInstance('mail.bluelogic.fr', 25)
                        ->setUsername('guillaume')
                        ->setPassword('girouette');
                
                //On instancie le mail
                $mail = Swift_Message::newInstance($transport)
                    ->setFrom($this->form->getValue('email'))
                    ->setTo('88666@supinfo.com')
                    ->setSubject($this->form->getValue('subject'))
                    ->setBody($this->form->getValue('message'));
                    
                //Envoi du mail
                $result = $transport->send($mail);
My factories is well configured. But when i try to send the mail, my website display an error...

Code: Select all

500 | Internal Server Error | Swift_TransportException
Expected response code 250 but got code "", with message ""
I don't know why but I search a solution.
Thanks for tour answer !
Last edited by blasil64 on Fri Dec 18, 2009 9:25 am, edited 1 time in total.
blasil64
Forum Newbie
Posts: 2
Joined: Fri Dec 18, 2009 7:42 am

Re: Swift_TransportException

Post by blasil64 »

I know, I redefine the transport configured in the factories...
Without the redefinition, it is functionnal !

Thanks to me !! :D
Post Reply