[Novalug] send html files using "mail" command
John Franklin
franklin@elfie.org
Wed Jan 19 17:24:45 EST 2011
If the sendmail command is installed (meaning, if any mailer with sendmail compatibility is installed including exim and postfix), then you can use that to send e-mail:
alice@example:~$ sendmail bob@example.com
From: Alice <alice@example.org>
To: Bob <bob@example.org>
Date: Wed, 19 Jan 2011 16:05:18 -0500
Subject: Some HTML communication
Content-type: text/html
<body>
<h1>An h1 tag</h1>
<p>A paragraph of text about nothing in particular.</p>
</body>
.
The format is to put all the headers up front, a blank line, and the body of the message. Note the period by itself on the last line.
This e-mail will be sent to bob@example.com as shown in the command line, not the bob@example.org in the headers.
jf
On Jan 19, 2011, at 9:42 AM, Clif Flynt wrote:
> Any chance that the meta* tools are installed?
>
> metasend is the original way to send mail with MIME headers, from
> back when MIME was MetaMail from AT&T Bell Labs (after it was Atomic Mail).
>
> I find metasend by default on my SuSE box, but not my Centos or Ubuntu
> boxes.
>
> Good luck,
>
> On Tue, Jan 18, 2011 at 11:49:08PM +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]
>>
>> Googling is not helping since is forwarding me to mailx or sendmail commands
>
> --
> ... Clif Flynt ... http://www.cwflynt.com ... clif@cflynt.com ...
> .. Tcl/Tk: A Developer's Guide (2nd edition) - Morgan Kauffman ..
> .... 18'th Annual Tcl/Tk Conference: 2011, Manassas, VA USA ....
> ............. http://www.tcl.tk/community/tcl2010/ ............
>
>
>
>
>
>
> _______________________________________________
> Novalug mailing list
> Novalug@calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20110119/4c7da720/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3918 bytes
Desc: not available
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20110119/4c7da720/attachment.p7s>
More information about the Novalug
mailing list