The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
hp ux not sending mail kkhan HP-UX 3 01-31-2008 07:27 PM
Mail sending panknil Shell Programming and Scripting 15 09-18-2007 10:24 PM
help on sending mail in ksh ting123 UNIX for Dummies Questions & Answers 2 04-05-2006 04:35 PM
sending mail mskarica UNIX for Advanced & Expert Users 3 04-12-2005 05:59 AM
sending a mail to a mail client solaris73 UNIX for Dummies Questions & Answers 5 11-18-2002 09:58 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-16-2008
Registered User
 

Join Date: Jun 2007
Posts: 52
better format for sending mail

i am using a script to create a file which contains the mail to be sent.in every steo this file grts appended through out the script using several variables.now i want to convert it into html format so that the mail will have better look and feel and the font color and size can be changed.
i tried using enscript but its not working.i am using solaris.is there any way to change the contant of a file (say xyz.txt to xyz.html)
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-16-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,111
Are you asking about how to convert text to HTML, or how to properly send an HTML file?

The proper way to send HTML is to use MIME to tag it as Content-Type: text/html (instead of the default text/plain).

Many services send a Content-Type: multipart/alternative with the same content in both text/html and text/plain so that it will fall back to plain text for users who cannot or don't want to receive HTML in email. (It's a security issue, for one thing.)
Reply With Quote
  #3 (permalink)  
Old 05-16-2008
Registered User
 

Join Date: Jun 2007
Posts: 52
first i want to convert the txt file to html format then i want to send it.
the contants of the file is in text format.i need to add html tags into this.than using mime i can send.the body of the mail should be in html format and contents should be same as that in the txt file.
if u can write a sample script to do this it wud be gr8
Reply With Quote
  #4 (permalink)  
Old 05-16-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,111
Without knowledge of the contents your file I can hardly be expected to produce anything better than <pre> and </pre> tags around the tired old text, which is hardly useful. But once you come up with a way to transform your file into useful HTML, the mail section of the FAQ forum contains a thread with a MIME mailing script (although I suppose it could be marked more clearly).
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0