Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
void sendEmail ( char *to, char *subject ) {
char cmd[1000];
sprintf( cmd, "mail -s %s %s", subject, to );
system( cmd );
}
void sendEmail ( char *to, char *subject ) {
char cmd[1000];
sprintf( cmd, "mail -s %s %s", subject, to );
system( cmd );
}
#include <unistd.h>
#include <wait.h>
#include <string>
using namespace std;
int mail(char* to, char* subject)
{
const char* mail = "mail";
char* args[4] = {"mail","-s",to,subject};
int pid;
int status;
if((pid = fork()) = 0)
{
execvp(mail,args);
}
else
{
waitpid(pid,&status,0);
}
return status;
}
int main()
{
int x = mail("some_user@example.com","test page");
return x;
}