How to send a mail from a rule to a IMAP mail account?

All examples I have seen so far are based on SMTP accounts. The documentation of the mail binding explains quite well how to use the method sendMail for SMTP, but when I switch the Thing to IMAP type I get the error: “‘sendMail’ is not a member of ‘org.openhab.core.thing.binding.ThingActions’”. The documentation seems to be uncompleted …

You cannot send mail via IMAP, it’s a protocol to retrieve stored mails.


smartass mode
IMAP = Internet Message Access Protocol
SMTP = Simple Mail Transfer Protocol

As Markus explained: one is for reading (IMAP or POP3 for that) and the other is for sending (SMTP).

Cristal clear. Thanks a lot.

1 Like