Maybe it’s a little hard to guess as there are many ways your mail server might be configured. If sounds like it is accessible via many host name but only one has a valid certificate.
If you run discourse-setup it’ll prompt you for the sending address.