Send email without SMTP server(DNS lookup)


Dns lookup is an advanced feature of ANSMTP, it enables your application sending email to recipient's mailbox without specified SMTP server. Please click here to read this article at first, it introduces how it works step by step, and it also provides some simple samples.

We'll discuss most popular issues as a complementarity.

"Error with sending recipient" occurs

There are two situations.

1. If you send email to multiple recipients in one time, this error always raises at the second or following recipient. It is likely that all of the recipients don't belong to the same domain. Please read "Limitation with DNS lookup" section of this article, it also provides the solution for that.

2. If you send email to one recipient, this error indicates that the recipient email address is invalid or something is wrong with server that server doesn't realize the recipient is a local user.

Email to hotmail.com or some servers was rejected or lost

If you send email to the recipient of hotmail.com with dns lookup, you will find your email will never arrive to the mailbox of recipient. Why?

A HELO command with a domain name is sent to remote SMTP server to identify current server while ANSMTP is relaying an email to a remote recipient. If no domain is specified to ComputerName property, default value is the current machine name.

Some of SMTP servers(hotmail.com) perform DNS Reverse to check if the domain is complied with IP address of your current machine, otherwise this email will be delete as a spam automatically.

Therefore, to send email to hotmail.com successfully with dns lookup, there MUST have a valid internet domain name resolved to your current machine and this domain MUST be assigned to the ComputerName property of Mail or FastSender object. If you don't have a valid internet domain on your machine, you have to specify a SMTP server to relay emails to hotmail.com.

Suggestions

Since there are some limitation with DNS lookup, to make your application can work fine in different environment, we have the following suggestions.

1. Providing options in your application that user can choose to send email with dns lookup or specified SMTP server.

2. Your application should retry to send email with a backup server if sending email failed with DNS lookup.


2001-2007 © Copyright AdminSystem Software Limited. All rights reserved.