appsmith
appsmith copied to clipboard
[Bug]-[232]: Encoding issue with SMTP plugin
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
From community:
i would like to ask a question about the SMTP app. We are currently successfully sending mails with it, however there is a strange thing happening with umlauts. The header of the sent mail says:
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
but the generated source code of the email clearly has ISO-8859-1 encoding:
bittet um R=FCckruf
the correct utf-8 quoted printable would look like such:
bittet um R=C3=BCckruf
are we missing something here, or should this be considered to be a bug?
are you seeing any issue with the email that is received at the other end ?
yes, Mail.app under latest macOS is not able to display the text correctly.
we tried to supply an html skeleton in which we supplied the ISO-8859-1 encoding as a charset directive, but that gained no success either.
Steps To Reproduce
TBD
Public Sample App
No response
Version
self hosted
i would like to provide the actutal rendering from Mail.app as additional info:

reach 29
Stats
Stat | Values |
---|---|
Reach | 29 |
Effort (months) | 0.25 |
@ajinkyakulkarni could you briefly explain what that means?
@miko007 - this is our internal experiment using the prioritization framework (called RICE scoring model). Please ignore the stats for now.
There is another user who could be facing an issue due to this encoding-decoding issue with the SMTP plugin - https://discord.com/channels/725602949748752515/760761686549463060/974586845939793920
Hello. It's a very good app, so I'm trying various things.
I created and sent an inquiry form by referring to the URL below.
https://docs.appsmith.com/datasource-reference/using-smtp
Then the characters are garbled (??????) probably because of "Content-Type: text / html; charset = us-ascii" in the email.
I live in Japan.
Is there a way to change charset to utf-8?
Or is there any other solution?
Attaching some screenshots below


Another user reached out today about this issue - https://discord.com/channels/725602949748752515/1041710823644594286/1041710823644594286
An EE user is also facing this issue.
I have a similar issue trying to use text generated in the Rich Text Editor. It comes as HTML entities, and there is no way to decode this to UTF-8. as I can't create javascript elements to use the browser to do it. Would appreciate a solution, hoping this issue can also solve that!
Same here, but depending on which mail tool i use. In gmail everything is fine but in thunderbird, special characters are shown as question marks.
Any news on a fix yet? I have the same problem.
I have a workaround for this:
_encode_utf8: (s) => {
// Workaround https://stackoverflow.com/a/13691499/2620154
// Note, however, that escape() and unescape() are deprecated.
return unescape(encodeURIComponent(s));
},
compiledBody = compiledBody
.replaceAll('ä', _encode_utf8('ä'))
.replaceAll('Ä', _encode_utf8('Ä'))
.replaceAll('ö', _encode_utf8('ö'))
.replaceAll('Ö',_encode_utf8('Ö'))
.replaceAll('ü', _encode_utf8('ü'))
.replaceAll('Ü',_encode_utf8('Ü'))
.replaceAll('ß', _encode_utf8('ß'));
Absolutely not the best way, but works for me.
Tested on local and this looks good to me