Jump to content
  • Advertisement
Sign in to follow this  
hkBattousai

Sending e-mail from a desktop application

This topic is 3332 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
This here is essentially the same as what ApochPiQ already said, but it should be worth trying. Another option that article proposes is trying to get a list of SMTP servers from the client's registry.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!