(beating dead horse but I'm totally lost..) Error: sendMail is not a member of

Sorry guys, this used to work and then stopped on its own. I have read multiple forums and have tried:

  • confirmed no mail settings set in addons.cfg
  • only mail binding that shows up is 2.5.3 version in console

openhab> list | grep -i mail
251 │ Active │ 80 │ 1.6.2 │ JavaMail API
252 │ Active │ 80 │ 2.5.3 │ openHAB Add-ons :: Bundles :: Mail Binding

  • cleared cache, rebooted
  • cleared cache, rebooted
  • rebooted and rebooted

I’m running 2.5.3. Sometimes Mail has worked in the past and sometimes after a reboot it just stops on its own. I have no idea how to troubleshoot this any further.

Test rules file:

rule “test rule for notification”
Item ZWaveNode02026931ZW4006InWallSmartMotionSwitch_Switch1 changed
val mailActions = getActions(“mail”,“mail:smtp:24e0787e”)
mailActions.sendMail(“email@email.com”, “Test”, “This is a test”)

Mail thing is set up through PaperUI


2020-03-28 17:16:56.441 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘test rule for notification’: ‘sendMail’ is not a member of ‘org.eclipse.smarthome.core.thing.binding.ThingActions’; line 6, column 5, length 169

Is there anything else I can try?

I also noticed that the “sendNotification” also gives me an error. This also used to work without any issues.

2020-03-28 17:26:04.528 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘test rule for notification’: The name ‘sendNotification’ cannot be resolved to an item or type; line 7, column 5, length 155

rule “test rule for notification”
Item ZWaveNode02026931ZW4006InWallSmartMotionSwitch_Switch1 changed
sendNotification(“email@email.com”, “test”)

Thank you for any pointers!

1 Like

Have you tried restarting openHAB (no reboot, no clear of cache)? That usually resolves this for me. It may or may not work for you.

Double check 2.5 issues after upgrade .
Enable debugging for the binding and check if the SMTP server thing changes status (OFFLINE?), eventually there’s a problem with the mail relay.
Restarting/rebooting will not solve config problems.

I can’t believe it, that actually resolved the problem. As soon as I restarted the service, I got a notification.

Both sendNotification and mailActions.sendMail are working now!

Thanks for the tip!

I’m glad it worked for you. What I find is that anytime I upgrade, downgrade, or clear the cache, I have to restart openHAB again in order to get rid of the sendMail not a member issue. Usually I forget and wonder why some rules are failing and email is not coming, then remember and restart…

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.