phil2_curtis
asked on
Send an email with attachments from the command line
How can I send and email with file attachments from the command line.
Thanks Phil.
Thanks Phil.
You can use the mutt email client.
mutt email@ddress -a filename.to.attache -s "Subject of email" < file.containing.message.bo dy
or
Another program that produces output that you want as the message body | mutt email@ddress -a filename.to.attache -s "Subject of email"
mutt email@ddress -a filename.to.attache -s "Subject of email" < file.containing.message.bo
or
Another program that produces output that you want as the message body | mutt email@ddress -a filename.to.attache -s "Subject of email"
mail whoever@wherever.com -s "hello there" < attachment
Isn't 'mail whoever@wherever.com -s "hello there" < attachment' only suitable for plain text attachments?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
*ping*
I'm still here. Happy thanksgiving!
ASKER
I will give you the points, even though I didn't use your example. My solution was along the same lines and that was to write my own program to do the task.
Phil
Phil
Compliments to the moonbeam chef. It worked like a charm!
$ uuencode my_attachment a_new_file_name | mail -s "this is the subject" me@mymail.com
This will send me@mymail.com an email with an attachment called a_new_file_name
Hope this helps