It returns true if the email was sent successfully, false if not. The arguments are easy to understand, one for the subject/title, another for the message/body, and another for the address (who to send it to.)
I don't think there is any way to do this built in to C++. You are going to need a third party library. What is the purpose of this email by the way? Are you intending to send it with the user's email account?
I'm creating an application that has a contact feature, a request more options feature, ect. Just general things that will need a way to send information to me. I thought that email wold be the best way to do this. So it will always send an email to my email.
Do you know of any third party libraries that would work good for this?
I think if it is all above board - then I think the OP/program should let the user know that the software contains this particular feature - I see no need to it in a covert underhand way.
read about pop/pop3 protocol. its easy to implement. You would be needing some basics of sockets though apart from C/C++.
searching the net you may get a pop client also with code.
To send e-mail, you need SMTP and a public IP with correctly setup DNS resolution (both ways). Sending email from behind NAT directly to someone's mailbox, without SMTP authorization, would very likely fail.
Why would you want your application to "send an email without the user knowing?" Sounds pretty malicious to me... You said you want it to be for contact, but wouldn't you want your user to know how to contact you in that case? But if it isn't for malicious reasons, then you either need a third party library, or you need to find out how to implement PHP into your application (PHP supports an email function!)
...easily send an email without the user knowing...
Not possible, sending mail requires an open port. As long as ports can be enumerated and the handle traced back to the parent process, that would be your process, then there is always a way for the user to detect outgoing mail. The only way around this is to have a rootkit on their box and every layer the user has monitoring access to.
@ rapidcoder:
Sending email from behind NAT directly to someone's mailbox, without SMTP authorization, would very likely fail.
This will actually fail 100% of the time. Modern Mailbox servers use ACL's rather well.