I set up database mail on a sql server 2005 cluster and when I send a test e-mail form SSMS it works flawlessly. When I try to send an email using msdb.dbo.sp_send_dbmail via the query window or in a job I get the following error message
Msg 14607, level 16, state 1, Procedure sysmail_verify_profile_sp, Line 42 profile name is not valid.
I tried adding @profile_name and then I get the following error message
Msg 8143, Level 16, State 1, Procedure sp_send_dbmail, line 0 Parameter ‘@profile_name’ was supplied multiple times
I am pulling out what little hair I have left trying to figure out what is wrong.