Community discussions

MikroTik App
 
thomsen
newbie
Topic Author
Posts: 27
Joined: Wed Sep 28, 2016 10:50 am

Change encoding for E-Mail notification

Wed Sep 28, 2016 11:51 am

I have a problem with encoding for email notification. Cyrillic symbols do not display correctly, for example notes for device. Most likely the reason is that emails are sent in us-ascii encoding, by default and i have no possibility to change it to UTF-8.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26881
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Change encoding for E-Mail notification

Wed Sep 28, 2016 12:07 pm

RouterOS does not support any encodings actually. Only A-Z and 0-9 can be used in most places.
 
thomsen
newbie
Topic Author
Posts: 27
Joined: Wed Sep 28, 2016 10:50 am

Re: Change encoding for E-Mail notification

Wed Sep 28, 2016 2:01 pm

RouterOS does not support any encodings actually. Only A-Z and 0-9 can be used in most places.
Thanks!
 
gmick
just joined
Posts: 5
Joined: Thu Sep 29, 2016 11:52 am

Re: Change encoding for E-Mail notification

Thu Sep 29, 2016 12:01 pm

MIME-Version: 1.0
Content-type: text/html; charset=UTF-8
Insert this under first line in subject
 
thomsen
newbie
Topic Author
Posts: 27
Joined: Wed Sep 28, 2016 10:50 am

Re: Change encoding for E-Mail notification

Thu Oct 27, 2016 12:17 pm

MIME-Version: 1.0
Content-type: text/html; charset=UTF-8
Insert this under first line in subject
gmick, thank you very much. I've inserted this line below the subject it works perfect!
 
Mobistek
just joined
Posts: 8
Joined: Sat Dec 21, 2013 12:22 pm

Re: Change encoding for E-Mail notification

Mon Jul 10, 2017 2:50 pm

Hmm can u please post here exacly where to put this code? Cause I coudn't make it work...
Actually I need UTF in body of e-mail message.
 
thomsen
newbie
Topic Author
Posts: 27
Joined: Wed Sep 28, 2016 10:50 am

Re: Change encoding for E-Mail notification

Tue Jul 11, 2017 4:11 pm

Hmm can u please post here exacly where to put this code? Cause I coudn't make it work...
Actually I need UTF in body of e-mail message.
See screenshot here:
Image
 
tabate47
Long time Member
Long time Member
Posts: 510
Joined: Wed Mar 13, 2013 5:23 am
Location: Los Angeles

Re: Change encoding for E-Mail notification

Tue Nov 13, 2018 9:48 pm

Here is my code. Where would I place the html portion?

[/tool e-mail send to=[/tool e-mail get from] cc="" subject=("Event at $[/system identity get name] ") body=($vMailBody)]
 
ali4heydari
just joined
Posts: 3
Joined: Sat Jul 15, 2023 1:25 pm
Contact:

Re: Change encoding for E-Mail notification

Sat Aug 17, 2024 1:37 pm

Worked for me by adding:
MIME-Version: 1.0
Content-type: text/html; charset=UTF-8
at the END of subject. putting the above code at the beginning of subject leads to have subject with "MIME-Version 1.0" in the email.
Besides it didn't work via tool > email > send-email Winbox GUI.
I also escaped quotation marks in the body. (\")
Example:
/tool e-mail/ send to="email@example.com" subject="Welcome to Stripe\r\nMIME-Version: 1.0\r\nContent-type: text/html; charset=UTF-8" body="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html dir=\"ltr\" lang=\"en\"><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\"/><meta name=\"x-apple-disable-message-reformatting\"/></head><div style=\"display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0\">You&#x27;re now ready to make live transactions with Stripe!<div> ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏ ‌​‍‎‏</div></div><body style=\"background-color:#f6f9fc;font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,&quot;Helvetica Neue&quot;,Ubuntu,sans-serif\"><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\" style=\"max-width:37.5em;background-color:#ffffff;margin:0 auto;padding:20px 0 48px;margin-bottom:64px\"><tbody><tr style=\"width:100%\"><td><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\" style=\"padding:0 48px\"><tbody><tr><td><img alt=\"Stripe\" height=\"21\" src=\"https://logos-world.net/wp-content/uploads/2021/03/Stripe-Logo-700x394.png\" style=\"display:block;outline:none;border:none;text-decoration:none\" width=\"49\"/><hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;border-color:#e6ebf1;margin:20px 0\"/><p style=\"font-size:16px;line-height:24px;margin:16px 0;color:#525f7f;text-align:left\">Thanks for submitting your account information. You&#x27;re now ready to make live transactions with Stripe!</p><p style=\"font-size:16px;line-height:24px;margin:16px 0;color:#525f7f;text-align:left\">You can view your payments and a variety of other information about your account right from your dashboard.</p><a href=\"https://dashboard.stripe.com/login\" style=\"line-height:100%;text-decoration:none;display:block;max-width:100%;background-color:#656ee8;border-radius:5px;color:#fff;font-size:16px;font-weight:bold;text-align:center;width:100%;padding:10px 10px 10px 10px\" target=\"_blank\"><span><!--[if mso]><i style=\"mso-font-width:500%;mso-text-raise:15\" hidden>&#8202;</i><![endif]--></span><span style=\"max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:7.5px\">View your Stripe Dashboard</span><span><!--[if mso]><i style=\"mso-font-width:500%\" hidden>&#8202;&#8203;</i><![endif]--></span></a><hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;border-color:#e6ebf1;margin:20px 0\"/><p style=\"font-size:16px;line-height:24px;margin:16px 0;color:#525f7f;text-align:left\">If you haven&#x27;t finished your integration, you might find our<!-- --> <a href=\"https://stripe.com/docs\" style=\"color:#556cd6;text-decoration:none\" target=\"_blank\">docs</a> <!-- -->handy.</p><p style=\"font-size:16px;line-height:24px;margin:16px 0;color:#525f7f;text-align:left\">Once you&#x27;re ready to start accepting payments, you&#x27;ll just need to use your live<!-- --> <a href=\"https://dashboard.stripe.com/login?redirect=%2Fapikeys\" style=\"color:#556cd6;text-decoration:none\" target=\"_blank\">API keys</a> <!-- -->instead of your test API keys. Your account can simultaneously be used for both test and live requests, so you can continue testing while accepting live payments. Check out our<!-- --> <a href=\"https://stripe.com/docs/dashboard\" style=\"color:#556cd6;text-decoration:none\" target=\"_blank\">tutorial about account basics</a>.</p><p style=\"font-size:16px;line-height:24px;margin:16px 0;color:#525f7f;text-align:left\">Finally, we&#x27;ve put together a<!-- --> <a href=\"https://stripe.com/docs/checklist/website\" style=\"color:#556cd6;text-decoration:none\" target=\"_blank\">quick checklist</a> <!-- -->to ensure your website conforms to card network standards.</p><p style=\"font-size:16px;line-height:24px;margin:16px 0;color:#525f7f;text-align:left\">We&#x27;ll be here to help you with any step along the way. You can find answers to most questions and get in touch with us on our<!-- --> <a href=\"https://support.stripe.com/\" style=\"color:#556cd6;text-decoration:none\" target=\"_blank\">support site</a>.</p><p style=\"font-size:16px;line-height:24px;margin:16px 0;color:#525f7f;text-align:left\">— The Stripe team</p><hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;border-color:#e6ebf1;margin:20px 0\"/><p style=\"font-size:12px;line-height:16px;margin:16px 0;color:#8898aa\">Stripe, 354 Oyster Point Blvd, South San Francisco, CA 94080</p></td></tr></tbody></table></td></tr></tbody></table></body></html>"
Result:
sc1.png
sc2.png
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 3 guests