一个名字相关联一个人怎么会从使用虚拟用户批处理脚本发送邮件(UID号码不存在,在/ etc/passwd文件)?不能与UID 1234
目前,它不断与失败:
$ mail -s "my subject" [email protected]
Cannot associate a name with uid 1234
一个名字相关联一个人怎么会从使用虚拟用户批处理脚本发送邮件(UID号码不存在,在/ etc/passwd文件)?不能与UID 1234
目前,它不断与失败:
$ mail -s "my subject" [email protected]
Cannot associate a name with uid 1234
可以直接调用sendmail
。只需构建包含标题的完整电子邮件消息,然后通过sendmail -t
发送。 -t
告诉sendmail从消息本身读取标题以获取所需的信息。
---start of mail.txt---
date: now
to: [email protected]
subject: My Subject
from: [email protected]
body of message.....
---end of mail.txt----
然后
/usr/sbin/sendmail -t < mail.txt
,或者你可以只打开一个管道,并呼应了消息的内容进入管道
| /usr/sbin/sendmail -t
尝试:邮件-v -s“我主题” [email protected] – Satish
将是不错的采取对代码http://sourcecodebrowser.com/nail/12.1/v7_8local_8c_source.html – user1929959