Receive email notifications

Hello, I would like to be able to receive email notifications of my connected objects every morning, how do I do it?
I’m new to openhab
Thanks in advance

And a cron triggered Rule.


Le lun. 4 mai 2020 à 21:23, Rich Koshak via openHAB Community a écrit :

what should I put in the server hostname field when configuring the smtp server because I put the hostname of my raspberrypi but I still have this error

Le mar. 5 mai 2020 à 12:42, francky Edou a écrit :

The SMTP server is something you tell openHAB to use, which is some external service provides your email services.
In the binding docs, it shows an example for gmail. But it’s up to you, and whatever email service you want to use.

Thanks for answering me, I’ll check that

I changed the hostname and put instead, but I still get this error

Sorry if I am so disturbing, I am a novice.

I don’t think gmail uses the default port 25

Which port does it use?
I’m really lost, I still get this error even when I change the SMTP Server Security Protocol.

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”
Item premier_interrupteur changed from ON to OFF
val mailActions = getActions(“mail”,“mail:smtp:6f4cf15a”)
mailActions.sendMail(“”, “Etat du split de l_insectarium”, “Le split de l_insectarium est eteint.”)Receive email notifications

No idea. That is question about the gmail service that you have chosen to use, and the port that they have selected for users like you to use.

Yes, that wouldn’t fix a wrong port.

Always the same error, I created a mail.cfg file in the services folder

but same thing

That is the way to configure mail binding version 1

mail binding version 2 is configured in a completely different way.

Use the documentation that goes with the binding version that you have installed.
Don’t use old tutorials you found on the web.

I deleted the mail.cfg file and here is the configuration of the smtp server

but always the same error

I followed the instructions of the documentation
and I admit that I don’t understand everything

That’s fine, but you have to find out.

I would think you’re going to need at least a username and password to go with that. Don’t show us those in a public forum!

I don’t think SSL is correct for that port

Gmail also has its own quirks beyond our control. See -

What is the username and password that I have to put?
Thank you very much for your patience

Oh come on … you can guess, surely :wink:
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.

I put my username and google password for the smtp username and password

But still nothing.

I really don’t know what to do so that the smtp host can send emails.

You didn’t say if you’ve done that enabling at Gmail.

You still have SSL/TLS set, I don’t know if that is correct for that port number.

I enabled it in Gmail but still not working
I must have missed something but I don’t know what

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.