Sunday, December 11, 2011

Database Mail

Sql Server has inbuilt database mail ,which can be used to send the database emails from the sql server.
database mail is not enabled by default, we can enable them using database configuration wizard or using sp_configure sp . database mail uses smtp server so it doesn't require any mapi client installed on server.
component that sends email runs outside of sql server engine , avoiding the work load on the engine.
sp_send_dbemail sp of msdb database will be used to send email .

Steps to be followed to setup email

A profile can have multiple smtp accounts. Database mail tries to use the accounts based on the priority set to send the emails. if there is any problem with an account , then it will use the account with the next highest priority.
Here is the smtp account details for  gmail. you should be aware of the smtp account details & port numbers to be used .




The outgoing smtp port should be opened in firewall.





















No comments:

Post a Comment