sending email from my c++ application
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement