1
是否可以使用uuencode
和sendmail
发送多个附件?使用命令行和sendmail发送包含多个附件的电子邮件
在脚本我有一个包含需要被附加到一个单一的类似电子邮件的文件变量:
$attachments=attachment_1.pdf attachment_2.pdf attachment_3.pdf attachment_4.pdf
另外一个$template
变量,如:
$template="Subject: This is the subject
From: [email protected]
To: %s
Content-Type: text/plain
This is the body.
"
我来了与:
printf "$template" "$recipient" |
sendmail -oi -t
在这个地方的某处我必须附加一切在变量?
是[mailx](http://en.wikipedia.org/wiki/Mailx)的一个选项吗?如果是这样,您可以简单地使用'-a'开关发送多封电子邮件。你有*使用vanilla sendmail吗? –
检查在http://stackoverflow.com/questions/19940292/using-uuencode-to-attach-multiple-attachments-from-a-variable-to-an-e-mail-and-s上的答案它会给你一个想法如何通过uuencode解析包含附件的变量。 – Incognito