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…