Quote:
----- The following addresses had permanent fatal errors -----
<amolm@techmahindra.com>
(reason: 550 Host unknown)
----- Transcript of session follows -----
550 5.1.2 <amolm@techmahindra.com>... Host unknown (Name server: mailhost: host
not found)
The error is telling you that the host techmahindra.com can't be found in DNS.
Your code is okay, it's a DNS issue either on their side or yours (if that is a valid host).
Send a test email from hwnej05 to the email address:
$ mailx -s"test"
youraddress@techmahindra.com < /dev/null
If you get the same type of error, then you know that your code was okay (as long as the spelling of the techmahindra.com is correct).
Then try to look up the mx address of techmahindra.com
$ nslookup
> set type=mx
> techmahindra.com
You should get info such as
Quote:
Server: some-server.in-your-domain.com
Address: some IP
TECHMAHINDRA.COM preference = 5, mail exchanger = ukgate.techmahindra.com
TECHMAHINDRA.COM preference = 5, mail exchanger = chandgate.techmahindra.com
...
If you don't get a response on the lookup, then your DNS isn't finding the MX record of the domain you are trying to send to and the email won't be sent.