Hi, We send out auto-generated emails using more or less the code that’s on thread http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=1216. However, it sometimes falls over as we get junk email addresses or typos, eg fred@@isp.com or the ever popular Ima@numpty@freeserve.co.uk and so on. Is there any way to ‘check’ the email before attemptingto send it? I’ve tried using IF MAPIMessages.Action(3) but it doesn’t work. Many thanks Justin
Surely someone else in the world has this problem??? Come on guys!
The only thing you can realistically check in an email address is the occurrence of exactly one @. This can be achieved by simple string operations. Due to the very nature of internet email transmission, you will never be able to determine if an email made it to its destination successfully, even less whether a given address will be valid or not when sending email. You might get an error response from the destination, probably only a few days later, possibly none at all. The address might be valid, but the mailbox could be full and the mail will be rejected one day and accepted another. So, besides the most trivial checks for syntactic correctness of an address, there is no way to be sure [:(]
quote:
Originally posted by xorph
The only thing you can realistically check in an email address is the occurrence of exactly one @. This can be achieved by simple string operations. Due to the very nature of internet email transmission, you will never be able to determine if an email made it to its destination successfully, even less whether a given address will be valid or not when sending email. You might get an error response from the destination, probably only a few days later, possibly none at all. The address might be valid, but the mailbox could be full and the mail will be rejected one day and accepted another. So, besides the most trivial checks for syntactic correctness of an address, there is no way to be sure [:(]
I can’t remember how many times I’ve explained this to upper management. Thanks, Heinz [;)] [:D] It’s pretty much like snail-mail, how do you know if an address is correct?
Thanks for the reply. I did mean check the email syntactically (sp?) rather than checking the email is genuine. My question really is I guess if there’s no other way of doing it, is there anyway of trapping the error you get from the MAPIMessages.Action(3) function?
We’ve got a workaround for this by using an extra codeunit and doing an IF mail_codeunit RUN. Not ideal, but at least it doesn’t jam up our scheduler. Cheers Justin