Sql server database mail

In a sql server 2012 database, I need to send out email messages to selected users when error records are located from a specific query. I also need to send the results of the query to the users. Due to this fact, I have the following questions to:

  1. Is it better to send out the email messages using the database mail on sql server and/or the office 365 live outlook mail? Would you also tell me why one mail method is better than a different mail method?
  2. Would you show me the following about using the database mail on sql server:
    a. How to setup the database mail,
    b. How to attach the query results obtained to the email message,
    c. How to 'connect' to the database mail when a daily scheduled job finds it needs to email the results
    to various users?

Just Google for it. MSDN has full documentation that is better than anything that we could describe.

1 Like