Sign in to follow this  
makingroulette

sending email from my c++ application

Recommended Posts

Does anyone know how to send an email message from a c++ application? ive learned that I will need to interface with an SMTP server in order to send email. I want my application to report the user's usage of the application, and have that data sent to myself via email.

Share this post


Link to post
Share on other sites
The easiest way is to use the mail API on Windows (which will go through Outlook or Outlook Express, most likey), and to stick the message in a file in /tmp and call system("sendmail ...args...") on UNIX.

If you want to connect directly to a mail server, google for RFC 821, which contains the basic SMTP protocol. You open a SOCK_STREAM (TCP) connection to the server, and do a simple, text-based "chat" dialog to send the message.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this