Sample Header Ad - 728x90

How to send mail from Linux with To, From, Subject, and File Attachment

0 votes
3 answers
3688 views
I need to be able to send mail from a bash script with the following: To Address, From Address, Subject, Body Text, and File Attachment I can send everything just perfectly using mutt EXCEPT, no matter what I do the "From" address does not get set correctly: e.g. mutt -e "my_hdr From:${FROM}")... I can also use sendmail or mailx but I can't seem to get the file attachment and the body text correct. e.g. sendmail -t -a file
Asked by SSDdude (171 rep)
Jun 7, 2018, 05:44 PM
Last activity: Aug 6, 2025, 06:03 PM