Jump to content

Subject of UTF-8 e-mails and avoiding spam filters


vineld

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.