I just realized this as well, when I tested with telnet I used “mail@mg.mydomain.com” as the username and it worked, so I will try it again with that as the DISCOURSE_SMTP_USER_NAME
I’d guess you think
DISCOURSE_SMTP_DOMAINis the domain of the user? It’s not - it’s the EHLO domain. You probably don’t need to set it.
not sure I follow what this means
for MailGun I was using mg.mydomain.com, for Discourse I was using discourse.mydomain.com. I dont actually have any DNS records set at the moment for mydomain.com, only for the Discourse subdomain and the TXT records for the MailGun DNS