1

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

Sharpeye500
  • 373
  • 1
  • 3
  • 5

2 Answers2

1

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.

BillThor
  • 27,737
  • 3
  • 37
  • 69
  • +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 01:05
0

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.

Raffael Luthiger
  • 2,001
  • 2
  • 17
  • 26
  • 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