Introduction
In this article I am going to explain how to send E-Mail in SQL server. You can send E-Mail from SQL server. Before sending e-mail we have to configure e mail in SQL server. Here I am explaining how to send E Mail in SQL server.
To send E mail we need to enable the Database Mail XPs parameter through sp_configure stored procedure.
Example
sp CONFIGURE 'show advanced', 1
GO RECONFIGURE GO sp_CONFIGURE 'Database Mail XPs', 1 GO RECONFIGURE GO |
Output
To send E- Mail we use fallowing statement
Example
USE msdb
GO EXEC sp_send_dbmail @profile_name='vipendra', @recipients='verma.vipendra@gmail.com', @subject='Test message', @body='This is the body of the test message. Congrates Database Mail Received By you Successfully.' |
Output
No comments:
Post a Comment