Explain how to send email from database - Sql server

Explain how to send email from database

SQL Server has a feature for sending mail. Stored procedures can also be used for sending mail on demand. With SQL Server 2005, MAPI client is not needed for sending mails.

The following is the process for sending emails from database.

- Make sure that the SQL Server Mail account is configured correctly and enable Database Mail.

- Write a script to send an e-mail. The following is the script.
USE [YourDB]
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'mathew@xyz.com; saadhya@xyz.com;anirudh@pqr.com’
@body = ' A warm wish for your future endeavor',
@subject = 'This mail was sent using Database Mail' ;
GO
How to make remote connection in database - Sql server
How to make remote connection in database - The following is the process to make a remote connection in database: Use SQL Server Surface Area Configuration Tool for enabling the remote connection in database........
Difference between cross join and Full outer join - Sql server
Cross join and Full outer join - Cross Join : No join conditions are specified. Full Outer Join: A combination of both left and right outer joins.........
Purposes of OPENXML clause sql server stored procedure - Sql server
OPENXML clause - OPENXML parses the XML data in SQL Server in an efficient manner. It’s primary ability is to insert XML data to the RDB.........
Post your comment