Ok so my question is how would i take the inputs of a user using my program and send to to my email or take their inputs aand write them to a wordpad or notepad file and then send it to my email. Is this possible to do this with C++? Are there any guides you can refer me to and how would i integrate this with a program I already have done? Heres an example of what I mean
#include <iostream>
#include<string>
usingnamespace std;
int main()
{string name;
int age;
cout << "Please enter your name"<<endl;
cin>>name;
cout << "Now please enter your age"<<endl;
cin>>age;
//What would I type here to take all the cin inputs above to send them to a
//specific email?
return 0;
}
Im using Windows 7, so then how would I use socketing to take cin results to send it to a specific email? Does anyone have a small example source code that I can use and tweak as a basic starting?
And also
1 2
#include<string>
#include <windows.h>//Are the .h parts needed they usually work when i dont use them.
And is it the coding different depending on which email site you use?
Wouldn't it be simpler to download from a PHP script that does this for you? Having to set up or connect to a mail server is a huge hassle; getting a PHP script to send emails for you is little to no effort if you know some basic programming.