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

Home >> Code Snippets >> SQL Query >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Sql Server 2008 Database Mail Account

Posted By:Sasi Prabhu       Posted Date: June 23, 2011    Points: 40    Category: SQL Query    URL: http://www.dotnetspark.com  

Database Mail Account in SQL Server 2008

Creating New Account :

EXECUTE @rv=msdb.dbo.sysmail_add_account_sp
    @account_name = ,
    @email_address = ,
    @display_name = ,
    @mailserver_name = ,

Example :

EXECUTE @rv=msdb.dbo.sysmail_add_account_sp
    @account_name = 'SampleAccount',
    @description='Creating Sample Email Account in Database Mail',
    @email_address = 'mail@yourdomain.com',
    @display_name = 'Database Account',
    @mailserver_name = 'smtp.yourdomain.com',

To View Account :

select * from msdb.dbo.sysmail_account


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

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