You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Email should send with attachments and be in HTML format.
If I use sendHtmlMail option the mail is sent and is in HTML format.
Current Behavior
Email send a warning to the log and email is not sent.
[2023-08-22 19:00:14.706 [WARN ] [ab.binding.mail.internal.SMTPHandler] - javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: text/plain; charset=UTF-8
Possible Solution
Currently I just send the email and attachments and use plain text.
Steps to Reproduce (for Bugs)
This doesn't work:
var message = "<H2>Someone is at the front gate at " + Date() + "</H2>";
var attachmentUrlList = ["http://192.168.1.164/zm/cgi-bin/zms?mode=single&monitor=1&scale=50",
"http://192.168.1.164:8080/static/graphviz.png"];
actions.get("mail", "mail:smtp:a514b96247").sendHtmlMailWithAttachments("xxxxxxx@gmail.com", "openHAB 4 front gate IR", message, attachmentUrlList);
This works:
var message = "<H2>Someone is at the front gate at " + Date() + "</H2>";
var attachmentUrlList = ["http://192.168.1.164/zm/cgi-bin/zms?mode=single&monitor=1&scale=50",
"http://192.168.1.164:8080/static/graphviz.png"];
actions.get("mail", "mail:smtp:a514b96247").sendMailWithAttachments("xxxxxxx@gmail.com", "openHAB 4 front gate IR", message, attachmentUrlList);
Expected Behavior
Email should send with attachments and be in HTML format.
If I use sendHtmlMail option the mail is sent and is in HTML format.
Current Behavior
Email send a warning to the log and email is not sent.
[2023-08-22 19:00:14.706 [WARN ] [ab.binding.mail.internal.SMTPHandler] - javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: text/plain; charset=UTF-8
Possible Solution
Currently I just send the email and attachments and use plain text.
Steps to Reproduce (for Bugs)
This doesn't work:
This works:
Context
I have mentioned it in the forum here:
https://community.openhab.org/t/oh4-sending-email-as-html-with-attachent-javascript-not-dsl/148951
Your Environment
Operating system Linux/6.1.0-11-amd64 (amd64)
Java Runtime Azul Systems, Inc. 17.0.7 (Zulu17.42+19-CA)
The text was updated successfully, but these errors were encountered: