PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Dec 18, 2018 9:29 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: failures does not work
PostPosted: Tue Jan 12, 2010 8:42 am 
Offline
Forum Newbie

Joined: Tue Jan 12, 2010 8:31 am
Posts: 1
I can not see any failures in the response (no message at all), although recieved mail: Delivery to the following recipient failed permanently:

xxx@zzdadas.gg

It does not work with methods batchSend and Send.
May be someone could help?
Version SwiftMailer 4.0.5
Here is my code:
<?php
require_once '../inc/Swift/lib/swift_required.php';

ini_set('display_errors', 1);

$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl')
->setUsername('realemail@gmail.com')
->setPassword('password')
;

//print_r ($transport);

$mailer = Swift_Mailer::newInstance($transport);

$message = Swift_Message::newInstance('Wonderful Subject')
->setFrom(array('realmail@gmail.com' => 'John Doe'))
//->setTo($answer)
->setTo(array('goodmail@good.com', 'xxx@zzdadas.gg' => 'A name'))
->setBody('Here is the message itself')
;

$logger = new Swift_Plugins_Loggers_EchoLogger();
$mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger));

echo $logger->dump();
if (!$mailer->batchSend($message, $failures))
{
echo "Failures:";
print_r($failures);
}
?>
Thanks in advance!!!


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 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:  
cron
Powered by phpBB® Forum Software © phpBB Group