Database Mail Multiple Recipients

  • Declare a varchar variable for the recipient e-mail addresses, assign the values to it, use it when calling sp_send_dbmail.

    declare @To varchar(max);

    select @To = @EmployeeEmail + ';' + @ManagerEmail;

    exec msdb..sp_send_dbmail @recipients = @To;

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • email address width is only 100. what if i want some more mail id to be added in operator?

  • I have 1 question .

    What if it returns more than one column? it did't work. (any help)

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply