WeBWorK Main Forum

Email displays names in base64?

Email displays names in base64?

by Richard Humphrey -
Number of replies: 2


 When I attempt to use the email function in webwork, the 'To' and 'From' lines have the correct email address, but the name looks like this:

=?UTF-8?B?UmljaGFyZCBIdW1waHJleQ==?= <rmh325@cornell.edu>

When I pipe that middle bit between the question marks throught base64 -d , I see the name! How do I fix this?

This is webwork 2.15 on Ubuntu 20.04, installed using the preinstalled virtual machine image. (Thanks for that!) The database and courses have been imported from WW 2.12 on Scientific Linux.

Thank you,

=Rich Humphrey

In reply to Richard Humphrey

Re: Email displays names in base64?

by Michael Gage -
I'm not seeing this on my version of 2.15 (not built from the preinstalled virtual image).

To troubleshoot:
If you create a new professor and use that to email a message does that also exhibit this behavior? i.e. is it only old entries in the database that cause this problem?

Are all of the webwork database tables set up to use utf8mb4?

@taniwallach may have more to say on this issue as well as @apizer.
In reply to Richard Humphrey

Re: Email displays names in base64?

by Nathan Wallach -

The use of base64 (formally MIME-Header) encoding in the "formal" mail headers is in accordance with the Internet standard  https://tools.ietf.org/html/rfc2047 to handle non-ASCII characters in the "name". 

Modern mail client should "unpack" the MIME-header (base-64) encoding behind the scenes and display the name properly. I certainly see the Hebrew name of students in the "From" line in mails coming out of my servers both when using "alpine" over a terminal and in Office365 online. However, it is running WW 2.15 in Docker with an older version of Ubuntu (18.04) as the "base" OS.

Sample raw header:

From: =?UTF-8?B?15jXnCDXoNep16g=?= <student@campus.technion.ac.il>

Displayed header

From: טל נשר <student@campus.technion.ac.il>

One possible issue is that the email client you are using is having trouble with the encoded data.

Another possible issues could be some change to the Encoding module of Perl between these two versions of Ubuntu.

Note: The change to do this was  in https://github.com/openwebwork/webwork2/pull/973