Sending an email as an attachment from the command line

John Whitley jrw at
Fri May 26 13:27:54 UTC 2006

Steven J Lamb wrote:
> This may be an off topic question but I don't know where I would post such a
> question. 
> I have a set of "quarantined" files all stored in gz files. And I want to
> have an automated program release them under special circumstances. These
> emails are essentially the full header and email before they are delivered
> in plain text. I have used mutt in the following fashion.
> Zcat qemail.gz > tmp.eml | mutt -a tmp.eml -s "test" recip at <
> /dev/null 
> But this results obviously in sending a .eml file which works great on
> outlook express but other email clients are confused. 
> If I were to figure out the encodeing for Outlook it would make it a .msg
> file. But this would confuse OE. I have found that Dbmail has the result
> that I am looking for. If I have a bounced messange from dbmail it will
> attach the original in its message, however the file type seems to morph
> depending on what program looks at the message. My guess it this deals with
> the MIME type, but I don't know either how to set this in a file or how to
> determine what type is needed to make it an email. 
> Any thoughts, redirections, general suggestions are more than welcome.
> Thanks
> Steven Lamb
Try 'metamail'. It sends attachments with a supplied mime type. I have 
an fc2 rpm which works with fc5 but I cannot remember where I got it from.
Google I suppose

John Whitley

More information about the users mailing list