I was wondering if it's possible to include an attachment with sendmail. I am generating the following emailfile.eml files with the following layoutFrom: Company Name <example@nowhere.com>To: recipient@madeup.comCC: someoneelse@place.comSubject: Generated OutputMime-Version: 1.0This will be the body copy even though it's terribleI am sending these emails using# /usr/sbin/sendmail -t < emailfile.emlThis part is working file but I would like to include an attachment to this email and I have not figured out how to do it
Sendmail Attachment
centos;email;sendmail
With mutt you can simply use:echo This is the message body | mutt -a /path/to/file_to_attach -s subject of message -- recipient@domain.comUsing mail command:mail -a /opt/emailfile.eml -s Email File user@example.com < /dev/null-a is used for attachments.You can use SendEmail:sendemail -t to@example.com -m Here is the file. -a attachmentFile