how to send email from storeprocedurs

  • Hi,

    I want to send email from Store Procedure. Anybody know how to do this?

    Thanks.

  • you can use msdb.dbo.sp_send_DBMail ro send mail from your SP, what exactly is that you want to do, if you can explain a bit more then we can give more information 🙂

  • CrazyMan (12/3/2008)


    you can use msdb.dbo.sp_send_DBMail ro send mail from your SP, what exactly is that you want to do, if you can explain a bit more then we can give more information 🙂

    dbo.sp_send_DBMail is only available in SQL 2005 or higher. In SQL 2000 you can use xp_sendmail which is installed by default or you can use xp_smtp_sendmail which you can download at http://www.sqldev.net/xp/xpsmtp.htm

    [font="Verdana"]Markus Bohse[/font]

  • ops forget to look on Forum 😀

  • You can also use CDOSYS (Collaborative Data Objects).

    You can find detail code example at [font="Courier New"]http://www.sqlservercentral.com/Forums/Topic527864-110-1.aspx[/font]

    One point worth mentioning: this does NOT that Outlook be installed and running on the SQL Server host. And you do NOT have to configure a MAIL account in SQL Server either.

    Rgeards

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

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