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
MIMEGPG(1)						      Double Precision, Inc.							MIMEGPG(1)

NAME
mimegpg - MIME-GPG utility SYNOPSIS
mimegpg [-s] [-E] [-e] [-c] [-d] [-p n] {--} {gpg options...} DESCRIPTION
The mimegpg tool signs, encrypts, or decrypts MIME-formatted E-mail messages using GnuPG. mimegpg does not contain any encryption code. It uses the GnuPG utility for all encryption and decryption functions. The -s option signs an E-mail message. The -E or the -e option encrypts the E-mail message. Specifying both -E/-e and -s encrypts and signs the E-mail message in a single step. The -d option decrypts the message. The -c option checks signatures. mimegpg works as a filter. It reads an E-mail message from standard input, which must be a MIME-formatted message. mimegpg signs, encrypts, and/or decrypts the message; then writes the encrypted, signed, or decrypted MIME message on standard output. The standard input to mimegpg must be a MIME E-mail message, with a "Mime Version: 1.0" header - even if the message does not contain any attachments. If the message contains any attachments, they are also signed and/or encrypted, individually. mimegpg automatically runs GnuPG, with the required options. mimegpg's options may also be followed by a single -- option; any remaining command line options are passed as additional options to GnuPG. The -E/-e option usually requires at least one -r GnuPG option, which may be specified in this fashion. The -p option specifies a file descriptor that contains any required passphrase. Any other valid GnuPG options may follow a double-dash, "--", as long as it makes sense for this operation (note that mimegpg automatically adds any GnuPG options that are needed to perform the given operation). The "--no-tty" option can be useful when mimegpg is used in a non-interactive mode. As always, secret keys that are password-protected secret keys cannot be used in the --no-tty mode, unless the -p option is used. SIGNING AND ENCRYPTING MESSAGES Use the -s option to sign MIME message content. Use the -E option to encrypt it. Use both options to both sign and encrypt. Follow with --, then any other GnuPG options. The -E option will require at least one -r GnuPG option. The -E option encapsulates the message content and all the attachments into a single encrypted MIME object. Some mail software cannot handle encapsulated content. The -e option encrypts each attachment separately, without encapsulation. If a secret key used for signing is password protected, the prompt to enter the password will be issued directly by GnuPG. Note that the -s and the -e (but not -E) options may issue multiple password prompts in interactive mode. mimegpg runs GnuPG multiple times if the MIME message contains attachments. GnuPG will be invoked separately for each attachment in the MIME message, and each invocation will prompt for any required key password. Note that the initial message headers are not signed and/or encrypted, except for the MIME headers themselves. However, any message/rfc822 MIME content - attached messages - are encrypted/signed in their entirety, headers and content. DECRYPTING AND CHECKING SIGNATURES The -d option attempts to decrypt any encrypted content in a MIME message. The -c option attempts to verify signatures of any signed content. Both -c and -d can be specified at the same time. -d looks for any multipart/encrypted MIME content, then attempts to decrypt it. -c looks for any multipart/signed MIME content, then attempts to verify the signature. The -c and -d options replace the multipart/signed and multipart/encrypted MIME content with a multipart/x-mimepgp section, that contains an additional attribute called "xpgpstatus". The value of the attribute is set to the exit code of GnuPG. Succesfully decrypting the message and/or verifying the signature sets the exit code to 0. A non-zero exit code indicates that the signature could not be verified, or the message could not be decrypted. The first section in this multipart/x-mimepgp is a text/plain section that contains any messages from GnuPG. The second section is any decrypted or signed content. mimegpg will include the signed content even if the signature could not be verified (check xpgpstatus). Encrypted content that could not be decrypted will not be included (obviously). Note - any existing x-mimegpg MIME section will have its content-type quietly reset to multipart/mixed, in order to avoid confusion (except when this is what got decrypted). SEE ALSO
reformime(1)[1]. AUTHOR
Sam Varshavchik Author NOTES
1. reformime(1) [set $man.base.url.for.relative.links]/reformime.html Courier Mail Server 04/04/2011 MIMEGPG(1)
All times are GMT -4. The time now is 12:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy