Mail binding - no Mails

Good morning dear forum!

Is there any new information about when the mail binding will work properly again?

It hasn’t worked under OH 3.4 in the last few months.

After updating to OH4.2.3 it still doesn’t work.

Messages about OH go out, but unfortunately not emails.

Who may have solved the problem and can send emails via OH?

Thank you very much and best regards

Can you please share your thing configs (without credentials)

very gladly:

IP:adresse: mail.unity-mail.de
Port: 587
Sicherheitsprotokoll: SSL/TLS
UserName: my MailAdress
Password: myPassword

But I have already used other PORTS, other outgoing mail servers from gmx. No setting works anymore.

For me the Mail binding works since it exists and has never stopped working.

Please be aware that for most providers you cannot use your login password, you have to create a separate app password.

I don’t know how this works at unity-mail, as I can’t find that provider.

But here is a working example for gmail:


UID: mail:smtp:google
label: Mail SMTP Server Google
thingTypeUID: mail:smtp
configuration:
  hostname: smtp.gmail.com
  password: <app password>
  security: STARTTLS
  sender: <my-email>@gmail.com
  username: <my-email>@gmail.com

This is all Vodafone Mail now. mail.unity-mail.de resolves to the same IP as imap.vodafonemail.de, but smtp.vodafonemail.de has a different address:

localhost:~# ping mail.unity-mail.de
PING mail.unity-mail.de (151.189.176.204): 56 data bytes

localhost:~# ping imap.vodafonemail.de
PING imap.vodafonemail.de (151.189.176.200): 56 data bytes

localhost:~# ping smtp.vodafonemail.de
PING smtp.vodafonemail.de (2.207.150.234): 56 data bytes

So I guess you have to try the setup here: https://www.vodafone.de/hilfe/vodafone-e-mail-cloud.html?accordion=1835337&tab=servereinstellungen
and make sure whether you use IMAP or SMTP. From your snippet that is not clear to me. Port 587 is only documented for SMTP on the Vodafone site.

1 Like

Here is a another working example for GMX:

UID: mail:smtp:gmx
label: Mail SMTP Server GMX
thingTypeUID: mail:smtp
configuration:
  hostname: mail.gmx.net
  password: <app password>
  security: STARTTLS
  sender: <my-email>@gmx.de
  port: "587"
  username: "<your-username>"

Hello and thank you for the quick responses.

Since I couldn’t get an email out of OH with either the old unity mail, the vodafonemail, or the gmx settings and you only sent me what I had already tried, I now know: It’s due to the binding .

I received my last email on November 2nd, 2024.
Since then I haven’t received any email from OH.
All changes didn’t work. Since things often get stuck in OH, I have to restart Openhab once a month.

But since shutting down and booting up the Raspberry several times didn’t help and I hadn’t changed any script and the whole thing had been running for more than a year and you didn’t give me any new insights: I simply deleted the binding and re-integrated it.

Now everything is working again.

So you helped me - thank you very much for that.

Openhab is not the most stable system for me (see monthly restarts and every 2 months some bindings that don’t work and have to be removed and integrated or have to be rebuilt by the developer) but openhab is the best system…

If at some point we can get it to run stably and I don’t have to tweak anything about it once a month, that would be great.

Thank you again for your help and have a nice evening.

Good morning! It’s a shame that my repair only lasted one email. Now no email comes out again.

Something’s not right there. Why does this work for you and I constantly have problems?

I have now also used the gmx setting.

Unfortunately my Openhab doesn’t send any emails.

Who can help?

Set the log level for the mail Binding to trace and post the logs when sending a mail.
Also, please show us, how you send the mail.
I can aldo confirm the mail Binding working over here with t-online and Domain Factory servers.

I sent emails like I had in previous years, until suddenly in November I couldn’t send them anymore.

val mailActions = getActions(“mail”,“mail:smtp:Mail_outbox”)
mailActions.sendMail(messagemail_recipient.state.toString, messagemailbetreff.state.toString, messagemail.state.toString)

Question: How do I set a protocol level for email binding? I’ve never done it before.

Thank you very much.

When you look at your installed bindings in MainUI, you will see a little gear icon.
Press it and you will see the logger settings.

Sorry, but I don’t know where a gear is. I don’t see any for myself.

I removed the binding again, integrated it again, shut down openhab, started it up again, closed Visual Studio and opened it again.

An email was just sent with my test switch.

Let’s see if the next email created by the system will be sent.

Otherwise, I will probably give up the convenience of sending emails and hope that the OH notifications continue to do their job.

And that’s exactly what I meant: Openhab is very unstable for me and I have constant failures. Sometimes a binding here, sometimes a hanging from Openhab there. It costs me a lot of time to keep the system running.

If I don’t have the system available permanently, it unfortunately doesn’t have the benefit that you would hope for from a smart home.

But I don’t give up hope. Not yet!!!

I think we need to analyze your sytem offline, as I cannot confirm instability, even on multiple installations supporting.
Especially the Mail Binding you are mentioning here has never failed for me, so I don‘t see anything to blame openHAB for.

1 Like

Right hand side of the REMOVE button you see the gear symbol.
( this is not the latest version of OH but I assume it is still there )

Ahhhh. Thanks.
Then I was wrong!!!
I went to “Administration” → “Settings” → “Things” and then clicked on the “+” at the bottom right. There are the bindings that I also made into a thing…

Then I misunderstood it.

Thanks.
Then I’ll set that up and start looking for where I can find the log data in Openhab.

Thank you for the info.

Found the log file.

Is it possible that no logs are written when setting to Trace if everything is fine?

I set the mail binding to trace, sent a test email, but found nothing about it in the log file.

Or is “/var/log/openhab/openhab.log” the wrong log?

My expectation ( without checking the code of the binding) would be that even in case of info in case of a mail was successfully send a log entry should be generated.
Moreover if logging is set to trace there should / must be more entries.
If that is not the case check settings for your openhab.log file.

Should be the correct one. Only in case you took actions to create a separate logfile there would be an other logfile. There is a different log file ( event.log ) but this is not used for trace logs.

I found it in the OH app under “openHAB LogViewer”. But there is also the following:

tail -f
/var/log/openhab/openhab.log
/var/log/openhab/events.log

I don’t know if that’s all. I didn’t find any other log file.

I didn’t find a log file in the UI on the computer either. And when I search for “log” on the Raspberry, my system doesn’t find anything either.