ot: mail flag for attachment in unix

Bill Campbell bill at celestial.com
Tue Sep 29 15:20:25 PDT 2009


On Tue, Sep 29, 2009, Dennis Malen wrote:
>mail -s "subject" senderemailaddress <locationoffile
>
>The foregoing works in AIX UNIX by inserting the locationoffile in the body 
>of the email.
>
>How would I add an attachment to the email? I have googled this and there 
>does not seem to be any flag or reference on how to add an attachment.

Mutt uses the -a option to attach files to messages.  This works
OK, but there can be issues such as failing of ~/.mail isn't
available or ~/.mail/sent is not writeable.  This would attach
two files to the message and have text from locationoffile.

mutt -a file1 -a files -s "subject" senderemailaddress <locationoffile

I finally bit the bullet though and figured out how to properly
build multi-part MIME messages with python when writing a script
to generate and e-mail OpenVPN files.  It's really pretty simple.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

The obscure we see eventually, the completely apparent takes longer.
  -- Edward R. Morrow


More information about the Filepro-list mailing list