here is a rule which should trigger the sending of the email, I don’t know if it is well written
rule “insectarium split eteint”
when
Item premier_interrupteur changed from ON to OFF
then
val mailActions = getActions(“mail”,“mail:smtp:6f4cf15a”)
mailActions.sendMail(“example@gmail.com”, “Etat du split de l_insectarium”, “Le split de l_insectarium est eteint.”)Receive email notifications
end
Oh come on … you can guess, surely
You are supplying openHAB with the details of a Gmail account for it to log in to, so that it can use your Gmail account to send emails.
Because you don’t want the whole world to use your Gmail account, it has a username and a password.
** Don’t show us that **
If you don’t know what they are, you will need to find out from Gmail.
So if you want openHAB to be able to use your Gmail account, it needs to know the username and password, and you would have to tell openHAB what those are by filling in some boxes on a form. We can guess what those boxes might be named.
If you have two factor authentication enabled on your Google Account, you need to create an app password. This will be the password you need to use. If you do not have two factor authentication stop now and go turn it on. Your email is far too valuable of a target to have it only protected with a password.
Your user name is your Gmail account.
Leave the “Server Security Protocol” blank, as rossko57 has repeatedly told you to do.
Set the SMTP Server Security Protocol to STARTTLS.
And use port 587.
Gmail doesn’t use standard SMTP settings.
When it fails to connect using your current settings, you should see errors in openhab.log telling you why it failed to connect. For example, when I left the protocol blank it said in the logs that I needed to use STARTTLS. I think the status on the Thing also tells you why it failed to connect also. That will help you understand why it’s failing and what to do to make it work.
I turned on two-factor authentication and created an application password that I put in the stmp server password field when configuring the SMTP server, I left the “Server Security Protocol” blank but the plain value appears every time I come back to it, and I put the port number 587 but still that