Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to send email from SQL/Stored procedure

Author  Topic 

Pasi
Posting Yak Master

166 Posts

Posted - 2014-01-30 : 16:33:19
HI,

I have an store procedure and I want to build an email with this store procedure to email me How can I use the email command to incorporate into my sql SP?
Thanks.
Pasi

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-01-30 : 21:34:36
use Database Mail

and sp_send_dbmail to send out the email


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Pasi
Posting Yak Master

166 Posts

Posted - 2014-01-31 : 00:15:29
Can you give me an example?
Thanks.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-31 : 07:42:01
quote:
Originally posted by Pasi

Can you give me an example?
Thanks.


http://sqljourney.wordpress.com/2013/05/25/sql-server-send-mail-using-sp_send_dbmail/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

Pasi
Posting Yak Master

166 Posts

Posted - 2014-01-31 : 11:18:09
Thank you Visakh!
Go to Top of Page
   

- Advertisement -