How to make C++ program send text file to email?

So I am doing this project for school and one thing I want to add is the ability to send the text file that the program creates and send it to an email.

I am having trouble with this and don't know where to start even after some googling.

Does anyone know what is needed to be able to do this?

Thanks any help is great
If you are allowed to use libcurl, then here is the link:
http://curl.haxx.se/

You have example code there.

If you cannot use it, then the hard way is to use sockets directly.
Topic archived. No new replies allowed.