Database Mail / Operators

  • When setting up DBMail, you create a profile which in turn contains one or more Eamil addresses.

    Why, when creating alerts for example, can you not just select a profile (which already contains a list of Email addresses to mail to) as opposed to also having to create an operator.

    Instead, you have to create an operator, enable the mail profile against SL Server Agent, and then you have to manually select an operator. Why can't you just specfiy a Profile at this level, as it already contains a list of Emails?

    Regards

    Steve

  • The profile specifies the email that the message come FROM. If you want to send to more than one recipient, you can specify more than one email address in the operator, which *I* don't usually recommend unless those email addresses are email distribution lists. I strongly recommend that you should build distribution lists to send to groups of people. The main reasoning is that if you want to add or remove someone, you go to the email server and not to every database server.

    Provided I understood your question.

    CEWII

  • Thanks for the explanation. I see now. When I use for example "exec master.dbo.xp_smtp_sendmail" you have to specify a @To parameter which I suppose is the equivalent of specifying an operator/email address i.e. a recipient.

  • You don't use "xp_smtp_sendmail" on SQL 2005 or 2008 do you?

    CEWII

  • Sorry, on 2000 I do.

    Post 2000 I use EXEC msdb.dbo.sp_send_dbmail.

  • Ok, you had me worried. Great..

    CEWII

Viewing 6 posts - 1 through 5 (of 5 total)

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