Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • 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!

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

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Send mail containing special characters

Send mail containing special characters

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?

RE: Send mail containing special characters

What components are you using to send the emails?

RE: Send mail containing special characters

I'm using the TidSMTP and TidMessage classes to send e-mail

RE: Send mail containing special characters

Perhaps try defining your strings as AnsiString instead of String or WideString instead of string. Perhaps you are experiencing a unicode issue.

RE: Send mail containing special characters

Thanks for your advice. I have tried it but unfortunately it didn't help. It still looks the same!

RE: Send mail containing special characters

What client is displaying the received e-mail message? Is it unicode compliant?

RE: Send mail containing special characters

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"?

RE: Send mail containing special characters

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?

RE: Send mail containing special characters

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.

RE: Send mail containing special characters

Download some other popular clients and see how they handle your emails. Examples would be: The Bat!, Pegasus Mail, Thunderbird, and smartphones.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

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