Gossamer Forum
Home : General : Perl Programming :

Character problem in emails from cgi's

Quote Reply
Character problem in emails from cgi's
I use Scandinavian characters (צהו etc) in my cgi-generated mails (eg.,from Links), and have (some) people complaining about these characters not showing in their mails. I have looked at various RFCs for mail headers, but have become rather confused from doing so ...

Does anyone know how mail headers should look in order to ensure sending these characters?

Does it make any differece if I use sendmail or mail (on a Linux)?

Would really appreciate your suggestions!

John
Quote Reply
Re: Character problem in emails from cgi's In reply to
Hi John,

Is it only in the headers that you are having problems, or in the message text as well? The proper format for an email address is:

"User Name" <user@user.com>

I don't think you can have the scandinavian characters in the user@user.com, but anything between the quotes should be fine. Also might want to see what mail reader the person is using if it's relatively infrequent. Their system might not be able to display those characters.

Cheers,

Alex
Quote Reply
Re: Character problem in emails from cgi's In reply to
Hi Alex,

I was refering to the body of the mail, but speaking about the mail header since this controls the message body.

I asked Jacob Palme, a Swedish email expert, who told me that I should add:

MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1

in the mail header, just before the To:, From: etc. Indeed that seems to have solved the problem - a test sent to those who complained about the lack of צהו's in our last newsletter gave positive results, ie., צהו's in their mail :-)

Cheers
John