Sign in to follow this  

Send email from C++ application

This topic is 3203 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

Is there a standard way to send an email from a C++ app on Windows/Mac/Linux? I figure it would have to rely on the PC having an email client of some sort, unless there is a nice open-source email client library I can use? For context, it's to let an app send crash/feedback emails.

Share this post


Link to post
Share on other sites
I guess the standard way in C++ would be to open a socket to a SMTP server (port 25) and follow the very simple SMTP protocol. You should be able to find this easily if you look on Google.

Share this post


Link to post
Share on other sites
Use your system's desktop services to open a mailto url.

This will open whatever mail client they have configured on the system, and it can be pre-populated with a reasonable amount of data.

Windows, Gnome, KDE and Mac all have different ways to access desktop services. Various libraries attempt to generate a unified interface to all of them -- I think glib has one. I don't know at this point how well it handles crossing platforms.

Share this post


Link to post
Share on other sites

This topic is 3203 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.

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