Only one email being received per domain

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
ipearx
Forum Newbie
Posts: 2
Joined: Tue Jun 26, 2007 2:44 am

Only one email being received per domain

Post by ipearx »

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

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;
 
Post Reply