Thursday 18 December 2014

How To Make Mail in SQL Server Database

How To Make Mail in SQL Server Database

In this post, I am detailing how you can set up data source email within SQL machine.
Data source email is utilized to deliver the e-mail utilizing SQL Machine. it really is replacing SQL Mail associated with SQL Machine previously edition. Data source Email has its own improvement more than SQL Mail. Data source Email is founded on SMTP (Simple Email Move Protocol) as well as extremely fast as well as dependable where by SQL Mail is founded on MAPI (Messaging Software Development Interface). Data source email depends upon Support Agent which means this support should be allowed with regard to Data source Email. Data source Email could be protected for more protection.

Setup Database Mail

You can find the database mail in sql server under the management like this:
sqlServer1.png
Right click on database mail and select configure database mail.

sqlServer2.png
sqlServer3.png
sqlServer4.png
sqlServer5.png
sqlServer6.png
sqlServer7.png
sqlServer8.png
sqlServer9.png
sqlServer10.png
sqlServer11.png
sqlServer12.png

To Send a mail from Database Mail

sqlServer13.png
sqlServer14.png
If you want to send mail from the code:
use msdb
go
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'TestingDatabaseMail',
@recipients = 'praveshsinghfaq@gmail.com',
@subject = 'Test Mail',
@body = 'Testing E-Mail';
sqlServer15.png


0 comments:

Post a Comment

 
Copyright © 2015. Free IT Codes | IT Projects . All Rights Reserved
Home | Company Info | Contact Us | Privacy policy | Term of use | Widget | Site map
Design by Herdiansyah . Published by Borneo Templates