The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 08-26-2008
dajon dajon is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 3
Solution to sending html in email

The best thing you can do is look at the raw output of a HTML formatted eMail then emulate it.

Here's the basics of what I did
create the script web-email.sh with the content below
#!/usr/bin/sh
(
cat $1 | /usr/sbin/sendmail -t
)### end of script

Some caution should be observed because outlook has some weird behavior.

Keep in mind that you still need to define the sendmail To:, From:, Subject, etc which can not be in HTML format.

Example: aa.out has the contents below:

To: sombody@someplace.com
From: sombodyelse@someplace.com
Subject: HTML Email
Content-Transfer-Encoding: quoted-printable


--__________MIMEboundary__________
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

< the HTML YOU WANT to send in the BODY of the email goes here >

--__________MIMEboundary__________--

Last edited by dajon; 08-26-2008 at 12:42 PM.. Reason: completed example