I am trying to use mail binding to send emails when a switch is triggered
But I am repeatedly getting an error
2020-01-24 11:48:04.889 [WARN ] [ab.binding.mail.internal.SMTPHandler] - Trying to send mail but exception occured: Sending the email to the following server failed : smtp.gmail.com:587
My rules file:
rule “example”
when
Item DemoSwitch received update ON
then
val mailActions = getActions("mail","mail:smtp:3dc13829")
mailActions.sendMail("xxxx@gmail.com","from openhab","message")
end
My mail.cfg file
// The SMTP server hostname, e.g. “smtp.gmail.com”
Yes, I tried, but I’m getting another error
2020-01-25 03:05:00.309 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘example’: ‘sendMail’ is not a member of ‘org.eclipse.smarthome.core.thing.binding.ThingActions’; line 7, column 5, length 78
I restarted the openhab
I uninstalled and reinstalled the mail binding
The “not a member of ‘org.eclipse.smarthome.core.thing.binding.ThingActions’” has been very painful for me too. Some things to try:
Make sure the old 1.x Mail Action is removed
Clear the cache and restart openHAB
Reboot
Repeat 2 and 3 as needed
This very finicky for some reason. Once you get it going it works well, but any changes and it can stop working. It stopped again for me on the 2.5.0 to 2.5.1 update. Steps 2 and 3 got it going again.
I am getting the same error for pushbullet binding also
2020-01-25 04:58:06.066 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘example’: ‘sendPushbulletNote’ is not a member of ‘org.eclipse.smarthome.core.thing.binding.ThingActions’; line 6, column 5, length 125
Your openHAB is likely still setup to use the old action from v1 in both of these cases.
As @jswim788 already said make sure it is removed. Double-check addons.cfg and use Karaf console to display what mail/pushbullet bundles are loaded.