Domanda

What are all the different ways (in code and from the GUI) which SQL Server 2008 can be used to send emails? For each way please state any dependencies e.g. an Outlook profile or Database Mail (enabled and configured).

So far I know of the following ways:

  • sp_send_dbmail (code) which requires Database Mail to be enabled and configured
  • Operator Properties - Notification options (GUI) which depends on ???
  • Alert - Response - Notify operators (GUI) which depends on ???
  • Job - Notifications - job complete (GUI) which depends on ???
  • Maintenance Plan - Notify Operator Task (GUI) which depends on ???

Are the any other ways in which SQL Server can be used to send an email either in code or through the GUI? I am only interested in the simple methods - preferably nothing complicated.

I am asking because I am confused by the array of different methods of doing the same thing, and I'm not confident in testing them out without knowing what the preliminary steps are!

I will accept the best answer which fills in the gaps in my knowledge and also provides a concise yet complete listing of all the different (simple) methods.

Thanks in advance for your help.

È stato utile?

Soluzione

all of the ways rely on Database Mail, which in the end uses the sp_send_dbmail procedure like this:

EXEC msdb.dbo.sp_send_dbmail    
    @recipients = 'you@email.com',
    @body = 'Body Message',
    @subject = 'Subject' ;

You will need to create a profile before sending any email. Here is a link to help

Database Mail doesn't depend on Outlook or MAPI anymore, it uses SMTP to send mail

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top