[SOLVED] New Mail binding - add custom sender name

The Mail binding sendMail is working for me, but, without two-factor. So I’m going to set that up, but I have a couple questions about what @rlkoshak says here.

When you set up the two-factor on gmail they instruct to select the app and the device to generate the app password. I have not attempted this yet, does openhab show up and what device are they referring to? (and if I read this post right, the app password generated simply replaces the email address in the user name field in the Thing definition?)

Where is the “SHOW MORE” that has the Server port? and is the field in the Thing definition: serverport=587? I didn’t find any reference to the serever port in the Mail binding wiki…maybe I’m confused…nothing new there. :blush:

This is all completely separate. That lets you use an app like Google Authenticator to generate a number every twenty seconds that is used as the second factor.

You need to generate an application specific password that bypasses the two factor authentication. https://support.google.com/accounts/answer/185833?hl=en

I am apparently totally confused. That link takes me to the same gmail page I was reading and I was referring to these instructions there:

The app is what Google app you want to allow this password access to. The device is just some unique name so when you come back later you can tell which password is assigned to which device.

You use the generated password as the password to log in. You still need to use your email for the username.

I’m sorry. I get that it is the app that I’m allowing google to log in.

What I don’t get is using the app password with the Thing defined in openHAB.

Does openHAB show up as an app in Google/Gmail so it can be selected?

I thought the gist of your post was how to set up two-factor login to gmail with the Mail binding and Thing.

Really confused now. :woozy_face:

No. openHAB doesn’t appear anywhere on Google. Anything that has the generated password can access the selected Google apps. Choose mail as the app, use the generated String as the password on your mail Thing, and openHAB will be able to access your Gmail.

Again, the app you select is what Google app/service can be accessed with that password. Not what app or service is doing the accessing.

You cannot do 2 factor log in from openHAB. You must bypass 2 factor by generating an app password.

Oh. I’m such a dope. I see now. :frowning_face:

Thanks for correcting my confusion.