Question

i have a custom c# app. is there a way i can send emails without smtp server. ie have a library that will simuate smtp functionality and send emails to external emails.

Was it helpful?

Solution

You could use Amazon's Simple Email Service (http://aws.amazon.com/ses/). It provides you with and API to send e-mails (low volume or bulk).

The service isn't free, but it is very cheap ($0.10 per 1000 e-mails). There is a free tier like in most Amazon cloud services, but this one is only applicable if you are sending the e-mails from EC2 instances (most likely not your case...).

Additionally it provides you with statistics on deliverability and some assurance that you won't get flagged as spam (unless that's what you are doing :)

OTHER TIPS

Whereas you could write your own SMTP protocol implementation so that you in effect act as your own SMTP server (it's not even difficult to do), you still have to interface with other SMTP servers (i.e. the recipients' servers). And over the last 10 years or so, a lot of those servers have become less trusting in who they will talk to. Many will do reverse DNS lookups to see if the IP address you're sending from is the same as the IP address listed in the MX record for your domain name. If they don't match, the server will refuse to accept mail from you.

Furthermore, many ISPs have blocked port 25 (used by SMTP) so that you can't send email from their networks except by going through their SMTP servers. That prevents customers from using their home high speed connections to send out spam. (At least, it makes things more difficult.)

So, the answer to your question is technically yes: you could write code that acts like an SMTP client to send mail. But in practical application, that becomes much more difficult due to restrictions imposed by ISPs and the recipient ISPs' SMTP servers.

If you're interested in writing SMTP code, you might find the following instructive:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top