I am using SendGrid on my Azure VM. I had previously been using my own pop3 server on a network in my building (not in the Azure cloud). I was using some pretty basic code to do a smtp.Send() - done this many, many times before. It worked fine up until a few weeks ago. I thought maybe Azure changed the rules so that you could only use SendGrid, so I got setup with them. But it still won't send. Here's what's weird: If I set a breakpoint and step through my code on the VM in VS2012, it will work. If I just try to run it from a browser without VS2012 in debug, it doesn't execute my code, doesn't throw an error, doesn't hang - it just doesn't do anything. Doesn't log anything to the application log, either. I have a try catch block :
Try
smtp.Send(mail)
Catch ex As Exception
lblMessage.Text = ex.Message.ToString
End Try
but nothing happens - no exception, no nothing. Why would it work fine when I step through in debug in VS, but not if I run the app normally from a browser? Also, it used to work fine up until a few weeks ago and now it doesn't. I haven't made any changes to this VM.
Thomas Derenthal