Sponsored Content
Full Discussion: How to mail a html file.?
Top Forums Shell Programming and Scripting How to mail a html file.? Post 302756521 by Skrynesaver on Wednesday 16th of January 2013 04:01:14 AM
Old 01-16-2013
MIME (Multimedia Internet Mail Extensions) allows you specify the content type of your mail.
in the headers of your mail (ie before the first new line) you could specify
Code:
Content-type: text/html;

This will tell the mail client to render the contents as html.
 

10 More Discussions You Might Find Interesting

1. Programming

How do I tell mail (or pine, or whatever) that the piped in file is html?

I'm writting a cron job and first it generates a HTML file, then grabs a list of email addresses and fires them to the people... I've been testing with the command line using: mail someone@somewhere.com -s Subject < file.html But once I look at it, it comes through as plain text not html. I've... (1 Reply)
Discussion started by: Boots
1 Replies

2. Shell Programming and Scripting

How can I write a HTML file in UNIX and sent it as a body of a mail

Hi, How can I write a HTML file in Unix. Once I do that, I want to send this file as a body of a mail, along with writing a subject for the mail I am sending through unix. How can that be done? (0 Replies)
Discussion started by: diwa81
0 Replies

3. Shell Programming and Scripting

mail: html content

hi guys, am required to prepare a report and mail it, to make it more appealing :p i wish to have content of mail in rich text format i.e html type with mailx how to specify the content type of mail body as html? Thanks in advance!!! rishi (2 Replies)
Discussion started by: RishiPahuja
2 Replies

4. Shell Programming and Scripting

Sending HTML attachment through mail

Hi I am new to unix and scripting.I am trying to send a html file as an attachment. SUBJECT="Type of Exceptions in Application" TO=Sushovan.Samals@gmail.com SPOOLFILE=/data/reg/tlogs/Monitor.html #echo "Send the E-mail message..." uuencode $SPOOLFILE $SPOOLFILE | mailx -s "$SUBJECT" $TO... (2 Replies)
Discussion started by: sushovan
2 Replies

5. UNIX for Advanced & Expert Users

Mail x to HTML

Hi, i've build a script, 1: neon_script and the other 2:neon_mailing those to scripts i run with 3:neon_handmatig After that i get a mail in plain text in my mail box and i want it in html format. I already tried already a several things but nothings seems to work. Somebody got i idea how... (3 Replies)
Discussion started by: Rensen
3 Replies

6. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

7. Shell Programming and Scripting

How to embed a html file in a mail sending from Linux box with uuencode or mailx?

How to embed a html file as subject in a mail sending from Linux box with uuencode or mailx or any other way? we do not want the file as attachment, it should be embedded in the mail subject. (2 Replies)
Discussion started by: johnveslin
2 Replies

8. Shell Programming and Scripting

problem with sending mail from txt file having HTML code via sendmail -t

Hi, i have the following code in shell named as test3.sh.. #!/bin/sh . /home/<user>/.profile export dt=`date "+%d%b%y"` export tim=`date "+%d%b%y %HM:%MM"` cd export WD=`pwd` SID="<sid>" export SID export ORACLE_SID=$SID export ORACLE_HOME=/oracle/$SID/102_64 export... (4 Replies)
Discussion started by: jassi10781
4 Replies

9. Shell Programming and Scripting

Need help in sending html mail with attachment

Hi Everyone, I am facing problems in sending html mail with attachemnt. I will able to send mail with attachment (plain text ) using mailx -s and uuencode command and also html mail without attachment using sendmail option. However I am not able to send html mail along with attachment.Either... (2 Replies)
Discussion started by: karthik adiga
2 Replies

10. Shell Programming and Scripting

HTML mail with Attachment

Hi, I am using the below code: #!/bin/ksh SUBJ="Send mail from Unix with file attachments" TO=sudha.viswanathan@jpmorgan.com CC=sudha.viswanathan@jpmorgan.com ( cat << ! To : ${TO} Subject : ${SUBJ} Cc : ${CC} ! cat << ! MIME-Version: 1.0 Content-Type: text/html `cat... (1 Reply)
Discussion started by: sudvishw
1 Replies
metasend(1)                                                   General Commands Manual                                                  metasend(1)

NAME
metasend - Crude interface for sending non-text mail SYNOPSIS
metasend [-b] [-c cc] [-F from] [-e encoding] [-f filename] [-m MIME-type] [-s subject] [-S splitsize] [-t to] [-z] [-n] [-D content- description] [-o outputfile] [-/ multipart-subtype] [-E] [-P preamble-file] DESCRIPTION
The metasend program will allow a user to send one or more pre-existing data file as non-text multimedia mail. With no arguments, the program will ask the user for the To, Subject, and CC fields. It will then ask for the name of a MIME content-type. Next, it will ask the user for the name of an existing file containing that type of data. After this, it will ask what encoding type, if any, should be applied to this data. Finally, it will ask if the user wants to include information from an additional file, in which case the last three questions will be repeated for the next file. Alternately, all of this information can be provided on the comand line, using the following options: -b -- specifies Batch (non-interactive) Mode. Will exit with an error message if all additional needed information is not provided on the command line. -c cc -- specifies the CC address -D description -- specifies a string to be used as the Content-description value -e encoding -- specifies the encoding type. Must be either "base64", "quoted-printable", "7bit", or "x-uue". "7bit" means no encoding is performed. -E -- specifies that the file being included is already a full MIME entity, and does not need to have any Content-* or other header fields added. -f filename -- specifies the file containing the data -F from -- specifies the From address -i "<content-id> -- specifies the content-id value for the MIME entity. Must be a legal content-id value, enclosed in angle brackets. -I "<content-id>" -- specifies the content-id for the multipart entity being created by metasend, if any. Must be a legal content- id value, enclosed in angle brackets. -m MIME-type -- specifies the MIME content-type -n -- specifies that an additional file is to be included. Before each use of the -n option on the command line, the options -m, -c, and -f, at a minimum, must have appeared,and must appear separately for each included file. -o outputfile -- specifies that the output from metasend should go to a named file rather than be delivered as mail. -P preamblefile -- specifies a file containing alternative text to be put in the "preamble" area of a MIME multipart message. -s subject -- specifies the Subject field -S splitsize -- specifies the maximum size before splitting into parts via splitmail(1). -t to -- specifies the To address -z -- specifies that the temporary files should be deleted EVEN IF DELIVERY FAILS. -/ subtype -- specifies the use of a MIME multipart subtype other than "mixed". This is intended largely for mail hackers. A much friendlier interface to non-text mail is provided by mailto(1). If more than one file is given, the parts will be combined into a single multipart MIME object. The mail will be delivered using the splitmail(1) program, so if it is very long it will arrive as several pieces which can be automati- cally reassembled by metamail. The definition of "very long" can be altered using the -S flag or the SPLITSIZE environment variable, as described in the splitmail(1) man page. SEE ALSO
audiosend(1), mailto-hebrew(1), mailto(1), metamail(1), mmencode(1), splitmail(1) BUGS
Should do a better job of choosing the encoding if you don't specify one. Should do MIME syntax checking on user-supplied content-type fields. Users are all too likely to provide bogus MIME content-type values, alas. In particular, there are various characters that are not allowed in parameters unless the parameters are enclosed in double quotes, but this sort of restriction is hard to enforce in a shell script! COPYRIGHT
Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) Permission to use, copy, modify, and distribute this material for any purpose and without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies, and that the name of Bellcore not be used in advertising or publicity pertaining to this material without the specific, prior written permission of an authorized representative of Bellcore. BELLCORE MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. AUTHOR
Nathaniel S. Borenstein, Bellcore Release 1 metasend(1)
All times are GMT -4. The time now is 03:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy