Question:
I am sending out Thank You emails to charity donors. I need to make an automatic report on the success ratio ( count good, count bad ). How do I get your email component to tell me this ?
Am using Argosoft SMTP mail server on *** and its log shows me I am having dns errors and ‘user does not exist’ errors.
Below is the bottom of the srvr log. I am in ’stress’ mode because I am
using "mailman.VerifySMTPConnection" and also the "mailman.VerifySMTPLogin"
and they’re coming back saying all is okay.
10/26/2005 11:24:25 AM - ( 227) 250 Recipient "***@hotmail.com"
OK…
10/26/2005 11:24:25 AM - ( 227) DATA
10/26/2005 11:24:25 AM - ( 227) 354 Enter mail, end with "." on a line by
itself
10/26/2005 11:24:26 AM - ( 227) Received 39339 bytes
10/26/2005 11:24:26 AM - ( 227) Putting a message from
do.not.reply@***.net, addressed to 1 recipients, to the outbox
10/26/2005 11:24:26 AM - ( 227) Message from
do.not.reply@***.net to 1 recipients has been queued
10/26/2005 11:24:26 AM - ( 227) 250 Message accepted for delivery.
10/26/2005 11:24:26 AM - ( 227) QUIT
10/26/2005 11:24:26 AM - ( 227) 221 Aba he
10/26/2005 11:24:26 AM - SMTP connection with 192.168.*.1 [192.168.*.1]
ended. ID=227
10/26/2005 11:24:26 AM - { 227} END SMTP
10/26/2005 11:24:26 AM - Starting delivery thread, ID=228
10/26/2005 11:24:26 AM - { 228} START Delivery
10/26/2005 11:24:26 AM - [ 228] Delivering to ****@hotmail.com
10/26/2005 11:24:26 AM - [ 228] Attempting to deliver to the domain
hotmail.com
10/26/2005 11:24:26 AM - Active delivery threads (ID=228 start): 0
10/26/2005 11:24:26 AM - [ 228] MX data for hotmail.com retrieved from MX
cache
10/26/2005 11:24:26 AM - [ 228] Retrieved 4 MX records for domain
hotmail.com
10/26/2005 11:24:26 AM - [ 228] Trying the server mx4.hotmail.com:
65.54.253.230
10/26/2005 11:24:31 AM - [ 228] 1 recipients have been permanently
rejected. Will bounce back…
10/26/2005 11:24:31 AM - [ 228] Address ***@hotmail.com has been
rejected. Will bounce back
10/26/2005 11:24:31 AM - [ 228] Connection was successful, but all
addresses were rejected by the server
10/26/2005 11:24:31 AM - Delivery thread, ID=228, terminated after running
for 4.359 seconds.
10/26/2005 11:24:31 AM - { 228} END Delivery
10/26/2005 11:24:31 AM - Active delivery threads (ID=228 end): 0
Answer:
The VerifySMTPConnection and VerifySMTPLogin have nothing to do with detecting invalid email addresses. VerifySMTPConnection simply determines TCP/IP connectivity with the SMTP server. VerifySMTPLogin verifies that the SMTP server is reachable and that the login/password is correct.
The behavior of SMTP servers is very different, depending on what brand of server you are using and other factors. Some servers, such as yours, will report back bad email addresses during the SMTP sending process (because they do a MX DNS lookup). In this case, the Chilkat MailMan object saves each bad email address (in memory) and after the SendEmail method returns, the mailman.GetBadEmailAddresses() method can be called to return a CkStringArray object containing the failed email addresses.
Unfortunately, it is impossible for SMTP servers to report invalid email addresses with 100% accuracy. Just because a MX DNS lookup succeeds does not mean that the email actually exists or will not get bounced. Your only other recourse is to set the Email.BounceAddress property to a separate email address that where bounces should be delivered. You can then setup a program (perhaps using the Chilkat Bounce component) to read bounced emails and update your database.