Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Of course you can send Email directly from SQL Server. Still doesn't mean you should. I presumed you would be sending it via IIS or Exchange, 6 of one, half a dozen of the other. It's just an SMTP server. But how are you going to trigger the Email job? It should only run under certain conditions, right? Are you going to have every one of your client app instances send the Emails, or designate just one of them to do the job? I was under the impression that you were shooting for more of a batch process than the occasional one-off Email, based on "Mails are sent on a daily basis." Good luck! Commented Apr 24, 2014 at 13:12
  • 1
    That sp_send_dbmail documentation doesn't say anything at all about whether the Email message is sent synchronously or asynchronously, for example. So if it's sent synchronously, then you have an expensive SQL Server connection tied up on a blocking call waiting for your SMTP server (IIS, Exchange, whatever) to successfully fire off that Email. That could be fast, slow, or fail. How do you deal with failed sends? Do you log it? Do you then roll your log back and try them again? Maybe the SMTP server was down temporarily. Maybe lots of things. I would NOT do this from SQL Server, FWIW. :-) Commented Apr 24, 2014 at 13:17