N00B. I cannot seem to get this right.
#include <iostream>
#include <cstdlib>
using namespace std;
int main(void)
{
system(("sendmail -options" + EMAIL_TEXT));
return 0;
}
N00B. I cannot seem to get this right.
#include <iostream>
#include <cstdlib>
using namespace std;
int main(void)
{
system(("sendmail -options" + EMAIL_TEXT));
return 0;
}
You need it to be a constant string so try this.
system(("sendmail -options" + EMAIL_TEXT).c_str());
c_str() converts the string into a const char*.
do you need a space between "-options" and the email address? Like:
system(("sendmail -options " + EMAIL_TEXT));
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.