[Novalug] send html files using "mail" command

Peter Larsen plarsen@famlarsen.homelinux.com
Sun Jan 23 02:49:12 EST 2011


On Tue, 2011-01-18 at 23:49 +0100, Miguel González Castaños wrote:
> As the subject says, I can't send html files using the mail command in 
> Linux bash (neither mailx nor sendmail are installed)
> 
> mail mymail@myprovider.com -a "Content-type: text/html" <./output.html
> mail: invalid option -- a
> Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
>              [-- sendmail-options ...]
>         mail [-iInNv] -f [name]
>         mail [-iInNv] [-u user]

Sorry about being a bit late with a reply here - there's quite a few
"mime" based encoders out there. Even one meant to email files:
mimesend:

$ mimesend 
Usage:
    mimesend [-t to] [-s subj] (-f file [-m type])+
        -n        Don't actually send it; just print it to stdout.
        -t to     The "to" address.
        -s subj   The subject of the message.
        -f file   Path to attached file.
        -m type   MIME type of most recent attached file.

I found it in the perl-MIME-tools package together with several other
tools to easily turn a stream into a mime-encoded string.

-- 
Best Regards
  Peter Larsen

Wise words of the day:
The only other people who might benefit from Linux8086 would be owners
of PDP/11's and other roomsized computers from the same era.
	-- Alan Cox
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20110123/eca05b7b/attachment.asc>


More information about the Novalug mailing list