[SOLVED] New Mail binding - add custom sender name

Hi Everyone!

In the new Mail binding I got everything up and working with GMail. One thing I couldnt find is how could I add a custom sender name in the mail which is sent by openHAB?
Like now it only shows the mail address in the From header, with the old Mail Action I was able to add something like “openHAB server”.

How could I do this?

Thanks!

Do you use SMTP or IMAP/POP3?

Can’t you add that to the sender address in the thing configuration, like "Sender Name" <sender@foo.bar>?

Hi Kristof,

could you please post your configuration of the new mail binding for GMail?
I am having some troubles setting this up.

Wanted to try some things out before posting here but i you have it already running this could probably save me some grief

I’ll try it, thanks!

Yes I’ll post it later today. I can only help with sending mails, and setting up SMTP GMAIL.

Create a new Mail Thing, I called mine Gmail.

  • Sender: This would be the custom sender name, like in Jan’s example
  • Server hostname: smtp.gmail.com
  • SMTP server security protocol: TLS
  • SMTP server username: your gmail address
  • SMTP server password: your gmail address or, if you have two-factor authentication set up (if not stop what you are doing and go set that up now!) an App password (search Google for tutorials)
  • Server port: 587 // this field is under “SHOW MORE”

Hi Rich,

thx for posting the settings.
even though my settings were originally the same as you posted, I recreated my mail thing
confirmed all settings and created a new app password. Maybe i got something wrong on the password or had a typo anywhere in my config i don’t know but now it’s working as intended

Thanks! I’m using the same config.
However my log is full of these warnings:

2019-08-16 03:05:07.195 [WARN ] [ty.util.ssl.SslContextFactory.config] - Weak cipher suite SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA enabled for SslContextFactory@1db23e9[provider=null,keyStore=null,trustStore=null]

Don’t know why but first it was not working for me as well…

I don’t use the new mail binding, but I get the same error. What can this be?

Exactly what it is saying: a cipher suite that is considered as weak is enabled. Probably we can disable it but that might lead to handshake problems, depending on the other side. If if occurs too often and spams your log I would set the log level of that class to error.

Ah, my bad, I didn’t read it very well, I saw “Error” and “null” so I thought that isn’t suppose to happen.

I have tried setting the log level of the Mail binding to ERROR but these warnings still can be seen. Which other packages should be set to ERROR only?

After thinking about it, are you sure that is the mail binding?

No I’m not 100% sure. This only started to appear after I have upgraded to 2.5M2 and I immeadiately setup the new Mail binding (no other new bindings installed/replaced).
So it might be the mail binding or something changed in the openhab core (?)

It looks like a message from jetty, not sure if that was upgraded between m1 and m2.

Should I open an issue about this? Or how could this error be traced back which causes this?

It is the same on M3

same here