Sending e-mail from a desktop application
I want to design a Windows program which is supposed to send e-mail messages.
I searched through Google and found some C++ SMTP libraries for this purpose. I also found numerous free SMTP servers. The problem is that, when I try to send e-mail with these kind of libraries, whatever SMTP server I choose, server doesn't work. SMTP library gives a message something like that the server is not responding. I think it is because of using a free server.
What can I do to make my code working? Is there any way to add an embedded server in my code? Or is there any other way of sending e-mail without using an SMTP server?
Any help will be appreciated.
You could try using the destination email address to look up the MX records for the target domain, then connect to the recipient's mail server directly and deliver the mail that way. It's a bit more complicated but it should work fine.
Quote:Original post by ApochPiQ
You could try using the destination email address to look up the MX records for the target domain, then connect to the recipient's mail server directly and deliver the mail that way. It's a bit more complicated but it should work fine.
How can I access the MX records and connect to the recipient's mail server? I want to learn this method, how can I start?
Or, isn't there any method in which I wouldn't deal with SMTP or POP protocol details.
Well, what you want to do is fairly tricky, because it's remarkably similar to what spam bots do. Most servers (at least ones with competent admins) do their best to curtail this kind of spam. Therefore, you're going to be fighting the same obstructions as a spammer in order to get this to work.
In fact, I'd be surprised if my suggestion even works, because chances are the target server will notice that you aren't the authenticated mail server you claim to be, and therefore your mails get dropped.
Have you tried using the SMTP libraries on a known working mail server, such as the one you use for your own email?
In fact, I'd be surprised if my suggestion even works, because chances are the target server will notice that you aren't the authenticated mail server you claim to be, and therefore your mails get dropped.
Have you tried using the SMTP libraries on a known working mail server, such as the one you use for your own email?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement