vineld Posted July 19, 2009 Share Posted July 19, 2009 When sending UTF-8 e-mails using mail() I have previously used this for the subject in order to make it UTF-8 encoded: $subject = "=?UTF-8?Q?".$subject."?="; This worked fine for the lower case versions of the non-English letters of the Swedish alphabet although the upper case versions screwed it, displaying the full string above as the e-mail subject. I then tried this: $subject = "=?UTF-8?B?".base64_encode($subject)."?="; which seems to work just fine so far. Why is this? Will this work for all languages? I am also looking for the best way to avoid being caught in spam filters since these are automatic e-mails sent by various membership systems. Which headers should I use? Currently I am using these: From Reply-To MIME-Version: 1.0 Content-type: text/plain; charset=UTF-8 Unfortunately the system e-mails often end up in spam folders which is not that good. Any help or guidance would be highly appreciated. Link to comment https://forums.phpfreaks.com/topic/166458-subject-of-utf-8-e-mails-and-avoiding-spam-filters/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.