itxtme
11-04-2012, 12:55 AM
I am attempting to email to multiple recipients. I am using swiftmailer and following their guidelines. When I try to get the admins to email to it is erroring
Fatal error: Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given
The outputted format from my db is $admins = "'email_1@email.com', 'email_2@email.com'";
The code from swiftmailer required for multiple is
$message->setTo(array('some@address.tld', 'other@address.tld'));
I have attempted everything I can think of to output in the same format as this, ie.
$message->setTo(array($admins));
This appears to echo them in the right format for the mailer however I still get the exception. If I manually right the addresses into the code as oppose to using a variable from the DB query it works. So it doesnt like echoing in the value string.. Any help please!?
Fatal error: Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given
The outputted format from my db is $admins = "'email_1@email.com', 'email_2@email.com'";
The code from swiftmailer required for multiple is
$message->setTo(array('some@address.tld', 'other@address.tld'));
I have attempted everything I can think of to output in the same format as this, ie.
$message->setTo(array($admins));
This appears to echo them in the right format for the mailer however I still get the exception. If I manually right the addresses into the code as oppose to using a variable from the DB query it works. So it doesnt like echoing in the value string.. Any help please!?