"=?utf-8?Q?" in e-mail From field, caused by EmailAddressCreate?

We got a complaint from one of our customers that the From field was illegible. It turned out it showed the quoted printable utf-8 encoding instead of the legible text. The full text read "=?utf-8?Q? MAIN=20Energie =0?=" <helpdesk@mainenergie.nl>, instead of "MAIN Energie" <helpdesk@mainenergie.nl>. Not all customers are effected though, most don't see the quoted printable but the intended name instead.

The e-mail address was composed by the platform built-in function EmailAddressCreate. Why does this function create a quoted printable From-field when all characters can be represented in plain ASCII? Is there a way to turn this off? (I guess not?) Is it only old e-mail programs having this problem with UTF-8 quoted printable, or is something else going on? If so, can we avoid it?

Hi Killian,

The quoted printable is only used when it has non-allowed characters.
Calling the EmailAddressCreate with "MAIN Energie" would not cause it to be encoded.
From what you wrote, that " =0" at the end is strange. Looks like your string is actually something like "MAIN Energie\0". ....but even with that I can't get the same result as yours:

João Rosado

Hi João,

This is the exact code we use to create that e-mail address:

EmailAddressCreate(Site.NewMA_Notification_FromName, Site.NewMA_Notification_From)

Indeed the \0 is a bit strange. I checked the site property's value, and SQL returns 12 for the length when I query ossys_site_property, so it's really 'MAIN Energie' without any additional characters.

After typing the above, I decided to create a small test screen to see what happens. I basically did what was done in the original program, using EmailAddressCreate with two site properties. In my web mail client, it doesn't display a sender at all (!):

and when I inspect the headers, it says the From is:

From: "=?utf-8?Q?"MAIN=20Energie"=20?=" <ems@mainenergie.nl>

So in this case a spurious space after "MAIN Energie". I'm not sure where the problem lies, but as it is, it seems that the EmailAddressCreate function has some problems...

We have the same problem, when the name has a space problem appears.


I tracked the problem and it is as a side effect of a issue fix done in
It's actually not an problem with the EmailAddressCreate but with the "From" field that is incorrectly double encoding the name just before the email is sent.

That issue (#997410) is going to be reverted (since it was to improve the usage of the from field without the need to use the EmailAddressCreate) and it's documentation improved.

So as workaround, until a that fix is made, do not use the EmailAddressCreate on the From field, writting directly the email in the
"Your Name <email@host.com>" format.

João Rosado
Hi João,

Thanks for the reply. Do you know what Platform version the "fix" will be reverted in?


we are on Outsystems 10 and this issue is still present.  When you use the Mrs.  or Mr.  in the name. or an  ê for instance.

correction with a normal first name and last name also, on one DEV it is ok, but on TEST not