batchSend() doesn't throw an error on malformed FROM address

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
iricketson
Forum Newbie
Posts: 11
Joined: Tue May 08, 2007 3:04 pm

batchSend() doesn't throw an error on malformed FROM address

Post by iricketson »

When sending email from the batchSend() method, if the FROM address is not an instance of Swift_Address, it will not throw an error, the email just doesn't send.

If you do the same thing with the send() method, it throws an error letting you know that the FROM address is not an instance of Swift_Address.




Just thought you might like to know...
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: batchSend() doesn't throw an error on malformed FROM add

Post by Chris Corbyn »

iricketson wrote:When sending email from the batchSend() method, if the FROM address is not an instance of Swift_Address, it will not throw an error, the email just doesn't send.

If you do the same thing with the send() method, it throws an error letting you know that the FROM address is not an instance of Swift_Address.




Just thought you might like to know...
batchSend() masks errors (new code in the most recent release). I'll do a preliminary check on the address before the batch starts rolling. This should make the error visible in this case :)

Thanks for the heads-up... you're right, I hadn't considered that case :)
Post Reply