0

I have written a code to send mail using SendAsync method of SMTP Client class. The codes work perfectly fine when I debug it. (i.e. running under webdevserver). But as soon as I host it on IIS 7, it just blows up. It is sending mails too slow and sometimes does not even send me the mail.

can anyone please guide me that what is happening and why my website is behaving differently on IIS.

leppie
  • 115,091
  • 17
  • 196
  • 297
Sumit
  • 2,932
  • 6
  • 32
  • 54
  • Not without more info, no. Is the SMTP server receiving the mail? What do it's logs say? Are you getting Exceptions when sending? – Andrew Barber Jan 23 '12 at 08:27
  • sometimes I receive time out exception, but rest of the times nothing. And how do I check if my SMTP server is receiving mails? – Sumit Jan 23 '12 at 08:44
  • 1
    Sounds like you should first check connectivity between web/smtp servers. Then check the SMTP logs to see what it's doing with your mail when it does get it. I can't help you with that; you should contact your server administrator. – Andrew Barber Jan 23 '12 at 08:47
  • @AndrewBarber : thanks, The reason I put up this question here, was that I wanted to know if by any chance SendAysnc works differently in debug mode and differently in actual deployment. I mean I just wanted to know if I was missing some settings for deployment or not. – Sumit Jan 23 '12 at 09:14
  • 1
    Code generally does not *behave* differently in Debug. If it did, the whole point of Debug would rather be moot in the first place, wouldn't it? (Keep in mind I'm not talking about *side-effects*, which are of course going to be different in Debug code. But the basic functionality should be the same( – Andrew Barber Jan 23 '12 at 09:16

0 Answers0