i have a question about the mail-binding in combination with a Jython script.
This part of the script worked with Telegram, but here the import of “Things” does not work.
from core.actions import Things def send_mail(event): mailActions = Things.getActions("mail","mail:smtp:gmail") mailActions.sendHtmlMail("email@example.com", "Test subject", "<h1>Header</h1>This is the mail content.")
My binding was configured as follows:
UID: mail:smtp:gmail label: SMTP GMAIL thingTypeUID: mail:smtp configuration: security: SSL hostname: smtp.gmail.com password: xxxpwdxxx sender: "openHAB " port: "465" username: firstname.lastname@example.org
Can someone tell me where the problem is, unfortunately i can’t figure it out… that would be great!
Thanks in advance,