Smtp failed to set up because of certificate failure

The last change to the code was this one Attach SSL context to SMTP notify and IMAP sensor (#72568) · home-assistant/core@cbd0c89 · GitHub

It was by @balloob and seems to be related to this issue.

Then again that commit was in 2022.6

Though rather hard to understand, I was wondering about differences in the use of config.get(CONF_USERNAME), CONF_USERNAME, and config[CONF_USERNAME], as well as name vs USERNAME. Can you or @balloob comment on that?