Symfony has a nice mailing system provided as a plug-and-play package, but sometime some tweaks are needed.
The swiftmailer do not fire exceptions, instead the send(message)
method returns the number of successful recipients that can be zero (representing an issue). However, another sent method exists: sent(message, failedRecipients)
which returns the list of failed email addresses.
Keep in mind that this errors are usually not catched during the normal code execution because the email sending is spooled.
The swiftmailer checks the from address and the to address, comporting a failure if this addresses are fake. Keep this in mind when you do functional testing.