I'm trying to send mail from my application server using the following code
FILE *mailer = popen("/usr/bin/mail -s 'Some subject here' user@domain", "w");
fprintf(mailer, "Hello %s,\nThis note is to inform you that your job completed successfully.\n", username);
pclose(mailer);
Question is, would I need to fork a thread to do this?
if the 'mail' command is 'fire-and-forget' opposed to 'wait-till-sent',
I guess I don't need a separate thread for this.
I'm using postfix for MTA.