Send email without SMTP server(DNS lookup)


Dns lookup is an advanced feature of EASendMail, it enables your application sending email to recipient's mailbox without specified SMTP server.

In general, we send email via specified SMTP server. How does the specified SMTP server know what address this email should be sent to? The answer is... it queries MX record of recipient's domain via DNS lookup. It then forwards this email to the SMTP server queried from DNS server. If recipient's server doesn't work fine, sender's SMTP server will send a failure-delivery report to the sender telling it failed to send out the email.

How does EASendMail SMTP component work with "Send email Directly"? Firstly, it queries MX record for recipient address from DNS, then sends email to recipient's email server directly. In short, if no SMTP server is specified in the code, EASendMail will send email to recipient directly.

Since querying DNS server consumes CPU time and networking resouce, the performance of "Send email Directly" is lower than sending email with specified SMTP server. Moreover, nowaday more and more SMTP servers block email sent from dynamic IP address, so we don't recommend you to use "Direct Send Email" except you have a static IP address or you encounter problem with your ISP SMTP server.

Every recipient may have different SMTP server, if there are multiple recipients in one message and you want to send email directly, you should send the email to the recipients one by one. To learn more, please refer to the code in Samples.

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.

See Also

Using EASendMail ActiveX Object
Work with EASendMail Service(Mail Queuing)
How to use DomainKeys Signature
Error with sending recipient(Relay denied)
Mail vs. FastSender
Programming with Asynchronous Mode
Digital Signature and Email Encryption
Work with RTF and Word
Programming with FastSender
EASendMail ActiveX Object References
EASendMail SMTP Component Samples