Re: [Zope] Problems with invalid email id's and sendmail tag
Daniel.Weber@SEMATECH.Org wrote:
our local smtp server apparently returns an error when an invalid local address is sent via the sendmail tag. This is not a problem when there is only one email address on the To: line, but I have several forms that mail to multiple recipients, so the error bombs the entire mail. Note that sending an invalid email address to a remote server works fine and I get the reaction I want - an email to the From: account stating there was an invalid address so I can clean it up.
Is this an smtp issue or is there some way to clean it up? Is the sendmail code in mailhost.py the place to work on it?
Please look at the patch submitted in the Collector to replace the sendmail logic with calls to the standard Python library's smtplib module (which wasn't available when the MailHost product was written): http://classic.zope.org:8080/Collector/1005/view This patch has been accepted and should be in the next release of Zope -- I _think_ it will help with your problem, but I don't know for sure.
If any mail gurus have any suggestions, I'd appreciate it. Right now I'm writing an external method to parse the returned error, get the invalid address, strip it from the To: list, mark the email id as bad and try to resend the message. It's a rather long, awful looking piece of work....
-- ========================================================= Tres Seaver tseaver@digicool.com tseaver@palladion.com
participants (1)
-
Tres Seaver