3
我想从我的应用程序服务器发送邮件使用下面的代码是“linux中的邮件命令”,即发即忘或等待邮件发送?
FILE *mailer = popen("/usr/bin/mail -s 'Some subject here' [email protected]", "w");
fprintf(mailer, "Hello %s,\nThis note is to inform you that your job completed successfully.\n", username);
pclose(mailer);
的问题是,我需要到餐桌一个线程来做到这一点?
如果'邮件'命令是'发射并忘记'反对'等待发送',
我想我不需要一个单独的线程。
我正在使用postfix for MTA。
谢谢! man page说:完整的gnu mailutils手册在debian系统中由于授权原因不可用。http://www.gnu.org/software/mailutils/manual/index.html太大doc,你能指出我在哪里看文档? – eugene
这很奇怪。 Fedora有Heirloom邮件而不是GNU,因此它有手册页。我的邮件版本的手册页是[here](http://heirloom.sourceforge.net/mailx/mailx.1.html) - 只需查找'sendwait' –