Is it possible to send multiple attachments with uuencode
and sendmail
?
In a script I have a variable containing the files that need to be attached to a single e-mail like:
$attachments=attachment_1.pdf attachment_2.pdf attachment_3.pdf attachment_4.pdf
Also a $template
variable like:
$template="Subject: This is the subject
From: no-reply@domain.com
To: %s
Content-Type: text/plain
This is the body.
"
I have come up with:
printf "$template" "$recipient" |
sendmail -oi -t
Somewhere within this I must attach everything in the $attachments
variable?