I am having one application which sends the email. It uses the NMSMTP component. In the NMSMTP.host is 'MAILHOST'. I am trying to find what is that MAILHOST and where the value is stored? How can I set that Host value?
I am able to connect using NMSMTP.connect but when trying to use NMSMTP.sendMail then I am getting error '554 mail from abc.com rejected for policy reason'
thanks.
The host is the email server for outgoing mail for the email account you're using to send the mail. For example, if your email address is Naren@example.com
, and your email server for outgoing mail is smtp.example.com
, your SMTP host is smtp.example.com
.
What exactly goes before .example.com
depends on what your server was configured to use. You'll have to check with the ISP providing the email account to find out what the proper host is, as it depends on how it was configured. (There's no "standard" SMTP host name for a domain.)