Subject: | Inconsistency in MIME::Lite with/without Mail::Address |
Date: | Tue, 8 Nov 2011 20:04:10 -0500 |
To: | bug-mime-lite [...] rt.cpan.org |
From: | Ricardo Signes <rjbs [...] cpan.org> |
From: "Lenga, Yair "
Hi,
I've been using MIME::Lite for many year to send messages to our users. Many
thanks for your effort.
Recently, I've noticed that I'm getting error message when users attempt to
register them self, and mistype their email address. If the user type in
something like (a@@b.com), MIME::Lite behavior depends on if Mail::Address is
install.
When Mail::Address is installed, I believe that MIME::Lite uses it to parse the
To parameter. If there are bad email, they will be simply ignored by
Mail::Address parse method, message is still sent to other valid recipients.
When Mail::Address is not installed, MIME::Lite uses a "lite" version for
extracting mail address. Unlike Mail::Address, if unrecognized email address is
found, the code will 'die "can't extract address". In this case, nothing is
delivered to other remaining valid email addresses.
My suggestion - It is possible to make the behavior consistent:
- Have a default behavior (either ignore, or die on bad email address).
- Add an option (similar to 'SkipBad' option for Net::SMTP) that will allow the behavior to be configured.
- Possibly add method to return list of email addresses that will be ignored
Let me know what you think. I believe those changes will make MIME::Lite more reliable for production jobs. In my case, it will reduce the need to scan log file, and arrange for resend of selected messages after manually editing the recipients lists.
Thanks again,
Yair Lenga