Page 1 of 1

[Done] Swift_TransportException

Posted: Fri Dec 18, 2009 7:44 am
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 !

Re: Swift_TransportException

Posted: Fri Dec 18, 2009 9:24 am
by blasil64
I know, I redefine the transport configured in the factories...
Without the redefinition, it is functionnal !

Thanks to me !! :D