.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

Can I Send mail using SQL Server

Posted By: Shweta     Posted Date: February 12, 2011    Points:2   Category :Sql Server
I need to send mail using SQL server. Can i do that. What SQL statement i need to write to send email using database.

Thanks In Advance

Author: Pandian          Accepted Answer   
Posted Date: February 12, 2011     Points: 10   


Yes. you can send Mail through SQL Server.

you have two ways..
1. SQL Mail (Using MAPI)
2. Database Mail (Using SMTP)

Database Mill is the replacement of SQL Mail. From SQL server 2005 onwards Database Mail is recommended one instead of SQL Mail.

Try to proceed with Database Mail..

1. You have to configure the Database Mail(Management --> Database Mail --> right click...)
2. Restart the SQL Server Agent Service as It take effect.
3. Define the Mail profile and an account for that profile.
4. Choose the profile you want to set as default in SQL Server Agent Service.
5. Use "sp_send_dbmail" to send mail through Database Mail...


If not I then who, If not now then when
Author: Shweta             
Posted Date: February 13, 2011     Points: 5   

Thanks a lot Pandian..


Author: Maverick             
Posted Date: February 28, 2011     Points: 20   

Yes you can
You can use SQL mail under management node to send the mail.

Hope this helps.


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend