web stats
Email alert encoding - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 12-12-2018, 05:55 AM
artturi artturi is offline
What's HL7?
Join Date: Dec 2018
Posts: 4
artturi is on a distinguished road
Post Email alert encoding


I'm sending e-mail alerts in response transformer. However, special characters such as ,,, are being displayed as ? in the e-mail. How can I set the encoding of alerts to say UTF-8 ?

alerts.sendAlert seems to take only one parameter..

Thank you!
Reply With Quote
Old 12-12-2018, 09:08 AM
agermano agermano is offline
Mirth Guru
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,054
agermano is on a distinguished road

The issue is not when calling alerts.sendAlert. The way the alerts themselves work is to use the system default charset when sending emails. There doesn't look to be any way to change this. So, likely you are running mirth on windows, because I think UTF-8 is the default on linux and mac.

Since you are manually generating the alerts, you could just directly send the emails. From the User API, you can do
var conn = SMTPConnectionFactory.createSMTPConnection();
That returns a SMTPConnection object with multiple send methods. The Alerts obtain a connection the same way, but end up calling this method http://javadocs.mirthcorp.com/connec...a.lang.String- instead of the one that allows you to specify a charset.
Reply With Quote
Old 12-19-2018, 04:42 AM
artturi artturi is offline
What's HL7?
Join Date: Dec 2018
Posts: 4
artturi is on a distinguished road

agermano, thanks for your response.

Actually we are using linux, and we had a problem with the unix locales.
So we just set locales to be utf8 / language we wanted to use and now the characters are displayed correctly in the email alerts.
Reply With Quote

alert, email, encoding, utf8

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 01:09 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation