Best way to send an email in C++?

I want to make a program that can send emails and attachments.I have been googling and i have seen people use Winsock and also libcurl.i dont know what to use.I hear to send an email to a gmail i need to encrypt with SSL which seems over whelming. Well i guess i need help.
It's pretty annoying to do in C++, what I usually do is make a PHP script (since it's very simple in PHP) and just secure it so the script can't be used for malicious purposes by people who try and reverse-engineer my programs.
Last edited on
I rather do it in C++.Any ideas how i go about it in C++?
Is this just for learning how it's done? Because there's generally no reason to reinvent the wheel ;)
Well could you tell how to do it in PHP and C++? :D im not trying to reinvent the wheel its just that the programs i want to make i want them to be in C++however i really want to know how to do it in PHP as well.Could you explain it in C++ as well and why its "annoying".Also in php as well.
In C++ it would take quite a lot of research and setup, I personally don't even know how to do it.

With PHP + C++, the PHP script uses a simple built-in function to send the mail, and the C++ program just posts the data to the PHP script.

For the PHP part, google 'PHP send mail'
For the C++ part, lookup libcurl
Thanks now i have a noob question...How do i get Libcurl to work in my IDE (Code:blocks).
Quick google search:
I don't use Code::Blocks so I can't really help directly.
Thanks for the help.
Topic archived. No new replies allowed.