How to send sp_send_dbmail to a group ?

  • Hi all,

    I am using msdb.dbo.sp_send_dbmail to send database mail to recipients which are individual addresses. However if I try to send it to an Outlook group, it displays a message "Mail queued". However it does not actually send it.

    Is it possible to send it at all, or I am doing something wrong ? I am using this command:

    EXECUTE msdb.dbo.sp_send_dbmail

    @recipients = 'our group',

    @subject = 'test',

    @body = 'test. ignore it'

  • SQL Guy-482125 (7/12/2010)


    Hi all,

    I am using msdb.dbo.sp_send_dbmail to send database mail to recipients which are individual addresses. However if I try to send it to an Outlook group, it displays a message "Mail queued". However it does not actually send it.

    Is it possible to send it at all, or I am doing something wrong ? I am using this command:

    EXECUTE msdb.dbo.sp_send_dbmail

    @recipients = 'our group',

    @subject = 'test',

    @body = 'test. ignore it'

    Is the group that you are trying to send to listed in the global address book?

    Try something like this:

    EXECUTE msdb.dbo.sp_send_dbmail

    @recipients = 'ourgroup@yourcompany.com;youremailaddress@yourcompany.com',

    @subject = 'test',

    @body = 'test. ignore it'

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Thanks, that worked. I found actual address from the group in Outlook properties.

  • Your welcome

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 4 posts - 1 through 3 (of 3 total)

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