On Thu, 13 Oct 2005, Mazhar wrote:

>         i have a requirement where in i need to send alerts to a set
> of users for which i have developed a script and it is working fine.
> For the body of the mail i am writing into a text file everytime and i
> am sending across using the command,
> 
> cat "textfilename" | mail -s "Subject" set of users
> 
>      This above is working fine i need help for sending the same
> textfile as a HTML file as the body of the mail please help me.

Seeing as you appear to be happy with a solution that doesn't make use 
of Perl, it's a little biit confusing to me as to why you're asking us. 

Nevertheless.

If "textfilename" contains HTML formatted text, then that's what will be 
sent to the recipient and, depending on the mail client on the other 
end, it may or may not Just Work.

Depending on your platform and version of `mail`, you may be able to add 
a command line argument that specifies that the message body will have a 
certain content-type, in this case text/html. 

If you want to remove the ambiguity and try to guarantee that things 
will work, I suggest writing the whole thing in Perl, using a module 
such as Mail::Simple. (There's at least a dozen others that could also 
work, but anything with "::Simple" in the name is usually promising to 
start with.) Read over the documentation for that module and you should 
be able to find examples that get you started. 
 


-- 
Chris Devers

EB#Fm€+¥ukþ¢
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Reply via email to