PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Oct 15, 2018 9:03 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Dec 18, 2009 8:44 am 
Offline
Forum Newbie

Joined: Fri Dec 18, 2009 8:42 am
Posts: 2
Hi !
I try to send email with the smtp protocol.
This is my code :
Syntax: [ Download ] [ Hide ]
$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...
Syntax: [ Download ] [ Hide ]
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 10:25 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Dec 18, 2009 10:24 am 
Offline
Forum Newbie

Joined: Fri Dec 18, 2009 8:42 am
Posts: 2
I know, I redefine the transport configured in the factories...
Without the redefinition, it is functionnal !

Thanks to me !! :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group