Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm sending emails using gmail's SMTP API. You can specify the host. I don't yet have a domain name so have set this as the IP of my production server. I presume setting the host makes it less likely your messages will be marked as spam and if they are you can resolve any blocking if your messages are legitimate? Any further sources as to understanding what the host attribute is for would be appreciated.

share|improve this question

closed as unclear what you're asking by Evan Anderson, Ward, Bryan, Jenny D, mdpc Jul 12 '13 at 16:25

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Can one of the "closers" of this question please explain why this post has been closed. I think it's clear what my question was, additionally there was a great answer from @NickW below and this itself has helped at least 2 other people. –  AJP Aug 13 at 10:41

1 Answer 1

up vote 3 down vote accepted

The host is there because often as not, the MX record for a domain only points to a server configured to receive email for that domain(s). Often the server configured to relay mail for authorized clients is not discoverable as such via DNS. There are some protocols like autoconfiguration which will find those sort of values for you, but it is not a standard, and not everyone has it configured.

Also, nowadays, most mail servers will not relay mail for just anyone, so you will be providing the host, and user/password combo to allow the API to send mail through a properly configured (hopefully) server, which will reduce the likelihood your mail ends up marked as spam, and so forth.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.