SQL Server to Send Mail


i followed example here:

http://www.codeproject.com/kb/database/sqlserver2008databasemail.aspx

 

everything fine point:

use

msdb

go

exec

sp_send_dbmail @profile_name='pinalprofile', _

@recipients='test@example.com', @subject='test message', _

@body='this body of test message. _

congrats database mail received successfully.'

 

i substituted in own profile­_name , own recipients.

 

when selected script , hit f5, got this:

msg 102, level 15, state 1, line 3

incorrect syntax near '@recipients'.

 

 

hi

you don't need _ .

  sp_send_dbmail @profile_name='pinalprofile', @recipients='test@example.com', @subject='test message',  @body='this body of test message. congrats database mail received successfully.'  

vt


please mark answered if i've answered question , vote helpful other user's find solution quicker


SQL Server  >  Getting started with SQL Server



Comments

Popular posts from this blog

SQL Server PSProvider SQL Server Authentication

BIT Version

How to calculate the delta size while diffing the files in TeamFoundationServer ?