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 have a section of code that sends email from SMTP server.

The code is carried out webservice & smtp server value is picked up from web.config, while the code hosted on server1 works (send/receive emails), whereas the same code hosted in server2 doesn't send/receive email.

There is some piece of webservice code which sends email via front end app(by consuming this webservice), i have 2 servers using the same smtp, the server1 sends email whereas server 2 fails, it will be great if you tell me how to reach the settings & check/compare server1 vs server2

Can you tell your thoughts?

Thanks

share|improve this question

2 Answers 2

I would expect the email server is on the same host as the server which is working. The email server is configured to require authentication before relaying for other servers. This is a common configuration.

Most email servers can be configured to relay email for trusted servers. You will need the email server to be configured to trust the server which is unable to sent email.

share|improve this answer
    
+1 for trusted relay. Make sure the SMTP server is configured to trust the server trying to do the sending. –  Cypher Nov 24 '10 at 1:05

Can both servers do a DNS lookup of the SMTP server name?

I would check this first.

Else you need to provide us some more information about the programming language, operating system and the rest of the environment.

share|improve this answer
    
Thanks, "Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server" - i see this error, any help? –  Sharpeye500 Nov 23 '10 at 23:18
    
OK in this case you need to set a username and a password. You need to authenticate to the SMTP server. The other option would be to reconfigure the SMTP server in order to accept the sending server. –  Raffael Luthiger Nov 24 '10 at 20:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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