Only one email being received per domain
Posted: Mon Jul 20, 2009 5:04 am
I'm setting up a simple blog email system, where there is a list of subscribers and when an item is posted it is sent via bulkSend to the recipients.
Here is a sample list of emails I'm using:
john@mydomain.com
tim@mydomain.com
mary@mydomain.com
roger@anotherdomain.com
bob@anotherdomain.com
where mydomain = my actual domain name I'm using. I only receive 1 email per domain name, in that case john@mydomain.com and roger@anotherdomain.com.
My email is set up to receive anything@mydomain.com, and I've checked my junk mail filters. I'm using Google Apps mail system.
I can confirm it's adding the 5 emails, and no errors are reported back.
Using Swift 4.0.3 on leopard with sendmail installed & PHP5, and I've tried both the sendmail and swiftmail transport, both do the same.
Any ideas? I took most of this code from the documentation. Also had the problem without the decorator plugin.
Thanks in advance
Tim
Here is a sample list of emails I'm using:
john@mydomain.com
tim@mydomain.com
mary@mydomain.com
roger@anotherdomain.com
bob@anotherdomain.com
where mydomain = my actual domain name I'm using. I only receive 1 email per domain name, in that case john@mydomain.com and roger@anotherdomain.com.
My email is set up to receive anything@mydomain.com, and I've checked my junk mail filters. I'm using Google Apps mail system.
I can confirm it's adding the 5 emails, and no errors are reported back.
Using Swift 4.0.3 on leopard with sendmail installed & PHP5, and I've tried both the sendmail and swiftmail transport, both do the same.
Any ideas? I took most of this code from the documentation. Also had the problem without the decorator plugin.
Thanks in advance
Tim
Code: Select all
$decorator = new Swift_Plugins_DecoratorPlugin($this->replacements);
$transport = Swift_MailTransport::newInstance();
//Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);
$mailer->registerPlugin($decorator);
//Create a message
$message = Swift_Message::newInstance('Wonderful Subject')
->setFrom(array('test@ps7.dev' => 'PowerSite 7'))
->setBody("Here is my body message")
;
foreach ($this->subscribers AS $subscriber) {
$message->addTo($subscriber->subscriber_email);
echo $subscriber->subscriber_email . '<br>';
}
//Send the message
$num_sent = $mailer->batchSend($message, $failures);
echo $num_sent;