sql server - In msdb.dbo.sp_send_dbmail, @profile_name is not valid -


i use sql server job execute sendemail stored procedure. job working fine when @recipients our specified email address.

since couldn't log our specified email address check whether email has been received, want change @recipients email address

the question when make changed, job history shows job not executed. error

profile_name not valid

does have idea this?

here example.

exec msdb.dbo.sp_send_email  @profile_name = 'isss group', @recipients = 'isss@xxx.edu', @body = @mess,--@mess table @body_format = 'html', @subject = 'student information update', @from_address = 'administration@xxx.edu'; 

i want change @recipients = 'isss@xxx.edu' @recipients = 'myemail@xxx.edu'to check whether email has been received. once change it, sql server job failed. error shows

profile name not valid.

you must pass name of registered profile; can't make them on-the-fly.

however, assume want different display name, hence why seem trying change renaming profile.

you either need create new profile new name, or pass in @ runtime. format is:

@from_address = 'displayed name <emailaddress@example.com>' 

so, example,

@from_address = 'isss group <administration@xxx.edu>' 

i use method, , might need here. whether there benefit setting entirely separate profile, don't know; have research further.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -