PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Jul 12, 2020 9:25 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Jun 21, 2009 3:25 am 
Offline
Forum Newbie

Joined: Sun Jun 21, 2009 3:20 am
Posts: 3
<?php
require_once 'swift_required.php';

$transport = Swift_SmtpTransport::newInstance('smtpout.secureserver.net', 80)
->setUsername('user@mydomain.com')
->setPassword('pass')
;
$mailer = Swift_Mailer::newInstance($transport);

//Create a message
$message = Swift_Message::newInstance('Wonderful Subject')
->setFrom(array(''user@mydomain.com' => 'John Doe'))
->setTo(array('danniel302@hotmail.com' => 'A name'))
->setBody('Here is the message itself')
;

//Send the message

$result = $mailer->send($message);

?>


i got this error: :crazy:

Fatal error: Uncaught exception 'Swift_TransportException' with message 'Expected response code 220 but got code "", with message ""' in /home/content/u/n/d/underdas1/html/live-mail/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:416 Stack trace: #0 /home/content/u/n/d/underdas1/html/live-mail/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(309): Swift_Transport_AbstractSmtpTransport->_assertResponseCode('', Array) #1 /home/content/u/n/d/underdas1/html/live-mail/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(117): Swift_Transport_AbstractSmtpTransport->_readGreeting() #2 /home/content/u/n/d/underdas1/html/live-mail/swiftmailer/lib/classes/Swift/Mailer.php(84): Swift_Transport_AbstractSmtpTransport->start() #3 /home/content/u/n/d/underdas1/html/live-mail/swiftmailer/lib/smtps.php(50): Swift_Mailer->send(Object(Swift_Message)) #4 {main} thrown in /home/content/u/n/d/underdas1/html/live-mail/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php on line 416


is simple but i dont know where is the problem.

thanks :banghead:


Top
 Profile  
 
PostPosted: Mon Jun 22, 2009 5:30 pm 
Offline
Forum Newbie

Joined: Sun Jun 21, 2009 3:20 am
Posts: 3
:banghead:


Top
 Profile  
 
PostPosted: Thu Jun 25, 2009 1:39 am 
Offline
Forum Newbie

Joined: Sun Jun 21, 2009 3:20 am
Posts: 3
SOLVED


I TRIED phpmailer on godaddy and it fails (fgets warning), but on localhost can stabilish the SMTP conection to use each relays


maybe swift too.


:drunk:


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


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