Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...The enviroment is simple, natural and efficient. The members are competent, educated and professionals..."

Geography

Where in the world do Tek-Tips members come from?

Send mail containing special characters

Kenbla (Programmer)
20 Sep 12 7:42
Hi all, I have a Delphi XE application which sends mails upon request. The mail function works rather well but I sometimes have a problem with the swedish special characters åäö and ÅÄÖ. When I send a mail to a number of recipients it looks OK for most of them but not for all! The special characters doesn't display correctly for those individuals!
I set the charset property like this: MailMessage.CharSet := 'utf-8';

I have also tried to use:
  • MailMessage.Encoding := meMIME;
  • MailMessage.Body.Text := UTF8Encode(sMsg);
  • MailMessage.Subject := UTF8Encode(txtAmne.Gettext);
None of the above have helped!
Some of the recipients run 64 bit Windows and they get the mail with corrupt special characters!
I should also mention that the recipients of the mail are spread all around the world.
Any suggestions?
Regards,
Kenbla
DjangMan (Programmer)
20 Sep 12 14:21
What components are you using to send the emails?
Kenbla (Programmer)
21 Sep 12 2:41
I'm using the TidSMTP and TidMessage classes to send e-mail
DjangMan (Programmer)
21 Sep 12 2:44
Perhaps try defining your strings as AnsiString instead of String or WideString instead of string. Perhaps you are experiencing a unicode issue.
Kenbla (Programmer)
21 Sep 12 6:23
Thanks for your advice. I have tried it but unfortunately it didn't help. It still looks the same!
TonHu (Programmer)
21 Sep 12 6:58
What client is displaying the received e-mail message? Is it unicode compliant?
Kenbla (Programmer)
21 Sep 12 7:09
The mails that are sent from my Delphi application goes to one mailserver and that mailserver distributes the mail to a number of different mailservers across the world. I don't have any idea what the client PC's looks like.
Can the different mailservers and/or client PC's be "unicode uncompliant"?
TonHu (Programmer)
22 Sep 12 8:57
Mailservers usually handle unicode correctly, but mail-clients don't have to comply to anything.
Who, using what mail-client, is complaining that it's not displaying correctly, and how have you checked & confirmed for yourself?
Kenbla (Programmer)
25 Sep 12 2:09
Hello, and thanks for your replies.
I don't have any idea what mail-clients the users have! They are spread around the world at different companies. I use MS Outlook and it works fine when I receive the mailmessages.
DjangMan (Programmer)
25 Sep 12 17:13
Download some other popular clients and see how they handle your emails. Examples would be: The Bat!, Pegasus Mail, Thunderbird, and smartphones.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close