0 votes
by (58.9k points)

I have a question about generated email header. How can I change the Subject / To header fields encoding to UTF-8.

This header field was generated:

Subject: =?iso-8859-3?Q?=5BKEP_=A9letisi=5D_deneme_maili_-_read_receipt?=

But I need the header field encoded as:

Subject: =?UTF-8?Q?[KEP_=C4=B0letisi]_serdar_deneme_maili?=

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (8.4k points)
Best answer

The encoding can be specified via the DefaultCharset property like this:

var mail = new MailMessage();
mail.DefaultCharset = Encoding.UTF8;