profile_name for sp_send_dbmail SQL Server 2005

sp_send_dbmail takes several parameters, most importtant ones are

Is there a way to find the valid profile_name in the database and what the profile contains


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

this will list all of the accounts:

exec msdb..sysmail_help_account_sp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Greens8301Author Commented:
Yes it does list the name, description, email address etc

Suppose I want to change the name ,  description, email address , what table/view  do I access

you can use this:

exec msdb..sysmail_update_account_sp

here are the params:

sysmail_update_account_sp [ [ @account_id = ] account_id ] [ , ] [ [ @account_name = ] 'account_name' ] ,
    [ @email_address = ] 'email_address' ,
    [ @display_name = ] 'display_name' ,
    [ @replyto_address = ] 'replyto_address' ,
    [ @description = ] 'description' ,
    [ @mailserver_name = ] 'server_name' ,
    [ @mailserver_type = ] 'server_type' ,
    [ @port = ] port_number ,
    [ @username = ] 'username' ,
    [ @password = ] 'password' ,
    [ @use_default_credentials = ] use_default_credentials ,
    [ @enable_ssl = ] enable_ssl

Greens8301Author Commented:
Can I diredtly insert to msdb..sysmail_profile
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.