Just to add up, I’d like to mention that not all providers will let Your mails deliver to their inbox if sent from a domain other than the one on which discourse is hosted.
I had a conversation with mailgun support when I was having issues in deliverability (i was using mail.mydomain.tld instead of forum.mydomain.tld) and that was the reason why my mails from discourse (which obviously are noreply@forum.mydomain.tld) were being flagged as spam so that’s not really ideal.