uuencodeとを使用して複数の添付ファイルを送信することはできsendmailますか?
スクリプトには、次のような単一の電子メールに添付する必要があるファイルを含む変数があります。
$attachments=attachment_1.pdf attachment_2.pdf attachment_3.pdf attachment_4.pdf
また、次の$templateような変数:
$template="Subject: This is the subject
From: no-reply@domain.com
To: %s
Content-Type: text/plain
This is the body.
"
私は思いついた:
printf "$template" "$recipient" |
sendmail -oi -t
この内のどこかに、$attachments変数内のすべてを添付する必要がありますか?