RE: SMTP Errors, Tim L, 02-08-2005
Version 3.0 validates the format of e-mail addresses
by Roger Harris, February 15, 2005 23:08
ODBscript will "hang" until a timeout when the server doesn't respond to a request, which can be for any of several different reasons. (If the server returns any kind of error, that request completes immediately and the error message is displayed in the script output. If you are getting an immediate "unknown user" error, rather than hanging until the timeout, send me an e-mail with more detail and I'll see if I can find a work-around. But if it's timing out, that means the server just isn't answering, neither success nor failure.)
Unfortunately, there isn't any way for ODBscript to detect that the server is intentionally not responding, which many servers will do if given a badly-formatted e-mail address (among other reasons). To avoid that happening at least in the case of bad addresses, ODBscript v3.0 now checks the format of each "to" address and skips over any that are not valid. If there were no valid "to" addresses for the message, then a "no valid recipients" error message is returned.
If you're using v2.2, you can check the address format yourself before the SENDMAIL. The following match( ) expression should catch most problems:
<% IF NOT match($to$,"^[a-zA-Z0-9].+@[a-zA-Z0-9].+\.[a-zA-Z0-9].+") %> (Bad address processing.) ...
Name E-mail optional TopicMessage:
HTTP Link: Link text: