[NTLUG:Discuss] sending an HTML email from command line

George E. Lass George.Lass at osc.com
Mon Jun 18 12:31:44 CDT 2001


You can use the "send" command:

#!/bin/bash
echo "To: user at isp.com" > /root/Mail/html.msg
echo "Subject: I have no idea" >> /root/Mail/html.msg
cat whatever.html >> /root/Mail/html.msg

/usr/bin/send /root/Mail/html.msg






While I've never tried this with an html file, It works just fine
with plain text.

George



Steve Jackson wrote:
> 
> I have an HTML file that I want to send as an email using the 'mail' command
> line app.  I thought you could specify a file name on the command line and
> 'mail' would use this file as the body of the message.  However, maybe I
> remembered incorrectly.  I want to make the HTML page show up in the
> receiver's email app (I know some email apps don't support HTML, but for
> this conversation let's assume they do) not as an attachment.  Any help or
> info would be great.  Thanks guys (and gals).
> 
> Jackson
> 
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss



More information about the Discuss mailing list