mtrax
(Paul (mtrax))
1
I’m converting my DSL script to Javascript and having some issues with sending emails
var email="test@test.com";
var thingActions = Java.type("org.openhab.core.model.script.actions.Things");
var mailActions = thingActions.getActions("mail","mail:smtp:mythbox_mail");
rules.when().item("MQTT_Test").changed().then(event => {
console.log(event);
mailActions.sendMail(email, "test email", "test email"+ event.newState);
}).build("test event", "testing");
log file:
> 2021-12-31 09:21:13.942 [WARN ] [ab.binding.mail.internal.SMTPHandler] - Sending the email to the following server failed : localhost:25
> 2021-12-31 09:21:13.942 [WARN ] [ab.binding.mail.internal.SMTPHandler] - javax.mail.MessagingException: IOException while sending message;
> nested exception is:
> javax.activation.UnsupportedDataTypeException: text/plain; charset=UTF-8
mtrax
(Paul (mtrax))
2
I see another reference to this issue here : Mail Binding errors, but it used to work
known bug:
hmerk
(Hans-Jörg Merk)
3
Fix just got meged and will be part of the next SNAPSHOT and upcoming Milestone…