I'd like to use sp_send_dbmail to loop thru and send a bunch of emails. I have a stored procedure that returns all the emails that need to receive a copy of the email. The part I'm not sure how to do is to use those values in the @recipients of sp_send_dbmail.
Whenever I've used sp_send_dbmail before, I was always hard coding in the email addresses. Is it possible to get the @recipients from a sql stored procedure?
Go to the complete details ...