![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| extracting a string from html file with sed or awk | Ragnar157 | Shell Programming and Scripting | 35 | 09-01-2008 05:39 AM |
| help with splitting a html file up | jeroen234 | Shell Programming and Scripting | 3 | 06-22-2008 03:26 AM |
| how to generate html file using script? | kittusri9 | Shell Programming and Scripting | 2 | 05-25-2008 11:38 PM |
| How do I extract text only from html file without HTML tag | los111 | UNIX for Dummies Questions & Answers | 4 | 11-28-2007 04:40 AM |
| Flat File to HTML | randerson | UNIX for Dummies Questions & Answers | 2 | 02-09-2007 10:37 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
HTML file in the mailbody
Hi Guys,
How can i send a html file in the mailbody. when i use the command cat aa.html | mail -s "hello" abc.gmail.com this displays the entire contents of the html file. It doesn't display in html format. |
|
||||
|
Quote:
Use "sendmail" instead. |
|
||||
|
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 11:42 AM.. Reason: completed example |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|