utf8-encoded letters in email subject

You might have discovered strange characters in your email-subject like: Ã¼, Ã¤ or Ã¶, and so on?
That’s because you have sent them as UTF-8 and they are being interpreted as ISO-8859. Maybee the charters in the email’s body part are correct because you have already set a proper encoding! Well, the body and the subject needs a separate encoding. You can solve the problem by passing the subject string like below:

'=?utf-8?B?'.base64_encode('Subject with special chars like: äöü').'?='