I did that, but it doesn’t work (have a look at my latest code). The
mailBuilder-method should return a
MailBuilder but it doesn’t.
Time cron "00 32 15 * * ?"
val mailAction = getActions("mail", "mail:smtp:087d5265")
2019-03-03 15:31:17.651 [INFO ] [.e.s.m.c.i.ModelRepositoryImpl:287 ] - Validation issues found in configuration model 'test.rules', using it anyway:
The method sendMail(ThingActions, Object) from the type SendMailAction refers to the missing type Object
The method mailBuilder(ThingActions, String) from the type SendMailAction refers to the missing type Object
2019-03-03 15:32:00.084 [ERROR] [.m.r.r.i.engine.ExecuteRuleJob:69 ] - Error during the execution of rule 'mailtest': 'withSubject' is not a member of 'Object'; line 26, column 25, length 60
If I remove the
.withSubject-part, the validation issues are still there, and it fails with
2019-03-03 15:34:00.031 [ERROR] [.m.r.r.i.engine.ExecuteRuleJob:69 ] - Error during the execution of rule 'mailtest': An error occurred during the script execution: Cannot resolve proxy: java:/Objects/org.openhab.binding.mail.builder.MailBuilder#org.openhab.binding.mail.builder.MailBuilder
So the whole issue really is that the new class cannot be resolved. If I just use
String (e.g. for the recipient and use the builder inside the ThingAction-method), the mail is sending out perfectly fine.