Using MIME to send html files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Using MIME to send html files
# 1  
Old 06-28-2001
Using MIME to send html files

Smilie
I am a programmer, but need to work with UNIX in this particular situation. I am used to the plain "mail -s" command and also familiar with how to send attachments in html... but I now need to send an email (not an attachment) in html format so I can embed links... etc.

I am told MIME is the way to go, but I am not sure what to do with that information.

Can someone help me with this?

Thanks
# 2  
Old 06-28-2001
Here's an example message that uses MIME:

Code:
From: me@me.com
To: you@you.com
Subject: MIME test
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_00E1_01C0A48A.908A51C0"

This is a multi-part message in MIME format.

------=_NextPart_000_00E1_01C0A48A.908A51C0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

this is the text portion of my message

------=_NextPart_000_00E1_01C0A48A.908A51C0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<A HREF="http://www.me.com">this is the HTML portion of my message</A>

------=_NextPart_000_00E1_01C0A48A.908A51C0--

Choose any string you like for the boundary, but it must be unique for each message. Two messages in the same mailbox with the same boundary will cause problems. You can include as many sections as you want, delimited by the boundary marker. It is polite to include a text version of your html for people who cannot or prefer not to read HTML messages.

HTH
# 3  
Old 06-28-2001
Thank you. I will try this code. I have been playing aroung with something very similar to what you have sent, but have had no success. The system still passes it as straight text with no interpretation.

Your header has a few more parameters.

Thank you for your suggestion.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script that gathers specific values from files and puts it into HTML to send e-mail

Hi All, Sorry for long topic here. So the drill goes like that, I need a script which gathers different values from different files/locations. A_CT=`cat a.dat | awk -F'|' '{print $1}' >> report.txt` B_CT=`cat b.dat | awk -F'|' '{print $3}' >> report.txt` C_CT=`cat c.dat | awk -F'|'... (4 Replies)
Discussion started by: shivakid
4 Replies

2. Shell Programming and Scripting

Construct and Send Multipart MIME Mail

Hi, I have requirment in shell script to incorporate multipart email with both html and text. Here am giving the text version. From: any@email.com To: your@email.com Subject: Success Execution - $company - Apps PO File Report Apps PO File Report Summary: #APPS Purchase... (2 Replies)
Discussion started by: kirankumar
2 Replies

3. Shell Programming and Scripting

how to send html email from shell script

This is my below script which is working fine as it send only plain text email. So My question is- How can I modify my below script to send this as an HTML formatted email? I want to show the text color of this expression `(echo "100*$TEST2/$TEST1" | bc -l)` as `RED` in an email and that can be... (3 Replies)
Discussion started by: raihan26
3 Replies

4. UNIX for Dummies Questions & Answers

Send HTML graph using sendmail

Hi all. Urgent help required. I am trying to send and HTML/PNG fromat graph from UNIX using sendmail. The graph needs to be in the body of the HTML email and NOT an attachment.:wall: Any ideas and help will be really appreciated. Best regards, Willz (6 Replies)
Discussion started by: Willz
6 Replies

5. Shell Programming and Scripting

MIME - HTML mail with Excel attachment - Please help!

#!/bin/ksh ( echo "MIME-Version: 1.0" echo "Content-Type: multipart/mixed; boundary=frontier" echo "--frontier" echo "Content-Type: text/html" echo "Content-Disposition: inline" echo "\n" echo "<html><body><h1>this is html formatted text</h1></body></html>" echo "--frontier" echo... (1 Reply)
Discussion started by: thulasidharan2k
1 Replies

6. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

7. Shell Programming and Scripting

Script to Convert HTML to MIME mail -- HELP!

Hi: I have writed a script that read a HTML file and convert this in a multipart mime fail to send in a mail. But the result isn't interpreted lika a mime file!! Somebody can see the error??? --------------------------- #! /bin/bash SB=$1 IF=$2 OF=$3 rm -f $OF.b64 ... (7 Replies)
Discussion started by: sushisan
7 Replies

8. Shell Programming and Scripting

how to send mail in UNIX using MIME

Hi, I am searching for an option to send mail with multiple attachments using unix. I know uuencode option, but I dont have the executable in our machines. So I am looking for some other option to do this. And I heard that we can send mails using MIME. Can anyone help me with the syntax and... (2 Replies)
Discussion started by: srilaxmi
2 Replies

9. Shell Programming and Scripting

shell send html email

I know how to send an email with sendmail in a shell script. I know how to send an email with an attachment in a script. But im trying to send an email and need to set Content-Type to text/html and insert a file as the body and not attachment. Send email with file as attachment: ... (4 Replies)
Discussion started by: Ikon
4 Replies

10. UNIX for Dummies Questions & Answers

Using mail to send HTML emails

Hi, I'm a programmer not a sys admin, so please excuse this if it seems a little out of place, but I think it applies to this forum. When I send my HTML newsletter from the server it comes in as plain text on some email programs and not others. Eudora is fine; Outlook Express, Hotmail, and... (2 Replies)
Discussion started by: dmennis
2 Replies
Login or Register to Ask a Question