I'm using the stored procedure msdb.dbo.sp_send_dbmail in sql server 2005 to send out emails.
I need to be able to send emails to email addresses stored in a table called emailadd. The msdb.dbo.sp_send_dbmail stored procedure uses the @recipients parameter to guage who the email is sent to, for example:
@recipients = 'firstname.lastname@example.org; email@example.com,
rather than hard coding these values i want the values to be derived from the emailadd table so that if the email addresses change in the table, the email will go to the right people.