On Wed, Nov 28, 2007 at 03:36:56PM +0200, Hetz Ben Hamo wrote: > Hi, > > I'm trying to write a very simple shell script which creates a simple > hebrew text file, which is then being sent by email using sendmail. > > Here's the script, pretty basic one.. > > #!/bin/bash > echo "From: [EMAIL PROTECTED]" >> mail.txt > echo "To: [EMAIL PROTECTED]" >> mail.txt > echo "Subject: =?UTF-8 úéøáòá äòãåä=" >> mail.txt > echo 'Content-Type: text/html; charset="UTF-8";' >> mail.txt > echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" > xml:lang="he" lang="he">' >> mail.txt > echo '<meta http-equiv="Content-Type" content="text/html; > charset=utf-8">' >> mail.txt > echo '<DIV id="main" dir="rtl">' >> mail.txt > echo "?úéøáò ùé" >> mail.txt > echo "!ãáåò äæ ïë íà" >> mail.txt > echo "</DIV>" >> mail.txt > echo "</html>" >> mail.txt > > (the file has been edited by gvim in windows). > > The mail.txt comes out OK, but when I'm sending it to my gmail > account, the incoming mail comes gybrish both in subject and the text. > > I admit, I have 0 experience creating HTML mails, is there any good > link to learn how to make it "correctly" so users can see both subject > and the html in good way?
I do not know. You might read rfc2045 and friends, or use some program/library that does this, or (probably simplest) send mail to yourself from a decent client (e.g. TB or gmail) and look at its "source" to see how it's constructed. Basically, you should use one of the available encodings supported by these RFCs and state which one(s) you chose - just like what you tried to do, only being more accurate. -- Didi ================================================================To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]