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


Top 5 Contributors of the Month
david stephan

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 = ,
    @description=,
    @email_address = ,
    @replyto_address=,
    @display_name = ,
    @mailserver_name = ,
    @port=,
    @username=,
    @password=;
GO

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',
    @replyto_address='reply@yourdomain.com',
    @display_name = 'Database Account',
    @mailserver_name = 'smtp.yourdomain.com',
    @port=25,
    @username='mail@yourdomain.com',
    @password='EmailPassword';
GO


To View Account :

select * from msdb.dbo.sysmail_account




     

Further Readings:

Responses

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