Email Validation problem

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
bruno_mac
Forum Newbie
Posts: 6
Joined: Mon Jan 14, 2008 3:34 pm

Email Validation problem

Post by bruno_mac »

Hi Everyone!

I am testing Swift Mailer for some email distribution and I notice that once in a while I get a 'Fatal error: Uncaught exception 'Exception' with message' error. The actual error is:

Code: Select all

 
Fatal error: Uncaught exception 'Exception' with message 'The recipients parameter must either be a valid string email address, an instance of Swift_RecipientList or an instance of Swift_Address.' in /home/domain.com/public_html/app/tools/Swift-3.3.2-php5/lib/Swift.php:337 Stack trace: #0 /home/domain.com/public_html/app/send/send_welcome.php(191): Swift->send(Object(Swift_Message), 'someemail@systemat...', Object(Swift_Address)) #1 {main} thrown in /home/domain.com/public_html/app/tools/Swift-3.3.2-php5/lib/Swift.php on line 337
 
The email that it is sending to has a _ which cannot be the problem. When I check the domain for the email I get a "400 - Bad Request" error.

What kind of verifications/validations does Swift Mailer do on an email before sending the message?

Thanks,
Bruno.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Email Validation problem

Post by Chris Corbyn »

Is there perhaps some corrupt character in the address? UTF-8? Whitespace either side? It's pretty much just a regular expression which validates the address.
Post Reply