-
1
- #1
=================================================================
I have search for some time to find a solution, to use mailx to send automated email from UNIX, which includes an attachment, subject and a message body text. It was hard to find solution, but finally fiddling with mailx the solution was simple:
BODY=<path to file with body message>
MAIL="<list of recipients>"
SUBJECT="<your subject>"
yourattachment=<path to the file to attach>
(uuencode $yourattachment yourattachment.txt;echo "`cat $BODY`") | mailx -m -s "$SUBJECT" -r noreply@domain.com $MAIL;
I hope this is helpful.
=================================================================
I have search for some time to find a solution, to use mailx to send automated email from UNIX, which includes an attachment, subject and a message body text. It was hard to find solution, but finally fiddling with mailx the solution was simple:
BODY=<path to file with body message>
MAIL="<list of recipients>"
SUBJECT="<your subject>"
yourattachment=<path to the file to attach>
(uuencode $yourattachment yourattachment.txt;echo "`cat $BODY`") | mailx -m -s "$SUBJECT" -r noreply@domain.com $MAIL;
I hope this is helpful.
=================================================================