diff --git a/src/com/sendpulse/restapi/Sendpulse.java b/src/com/sendpulse/restapi/Sendpulse.java index 0f6ccbc..e2ba3a2 100644 --- a/src/com/sendpulse/restapi/Sendpulse.java +++ b/src/com/sendpulse/restapi/Sendpulse.java @@ -632,7 +632,9 @@ public Map getBalance( String currency){ public Map smtpSendMail( Map emaildata ){ if(emaildata.size()==0) return this.handleError("Empty email data"); String html = emaildata.get("html").toString(); - html = Base64.getEncoder().encodeToString(html.getBytes()); + try { + html = Base64.getEncoder().encodeToString(html.getBytes("UTF-8")); + } catch (UnsupportedEncodingException ignore) {} emaildata.put("html", html); Map data = new HashMap(); String serialized = Pherialize.serialize(emaildata);