November 1, 2012 at 6:41 am
How to send a mail through Storedprocedures with out using system stored procedures
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
November 1, 2012 at 6:44 am
Why do you not want to use the built in SQL mail procedures?
One way would be to build a CLR proc which does the sending of the mail for you.
November 1, 2012 at 6:48 am
To My knowledge the only way to do it is using xp_sendmail, the only other way would be to run an xp_cmdshell to call an external SMTP program, or write your own CLR to send the mail, but I think theres security limitations in what a CLR can do.
However why would you want to reinvent the wheel and not use xp_sendmail?
_________________________________________________________________________
SSC Guide to Posting and Best Practices
November 1, 2012 at 6:49 am
kapil_kk (11/1/2012)
How to send a mail through Storedprocedures with out using system stored procedures
What? without system stored procedures? like msdb.dbo.sp_send_dbmail?
so you are saying instead of using the built in, standardized, tested and fully functional system that is included free, you want to use something else?
if you really wanted to use something else, it depends.
You could make a CLR that calls the built in .NET functionality to send a mail, but that would probably make synchronous calls and would be slower than sp_send_dbmail.
if you enable xp_cmdshell, you could call any exisitng third party dll via SP_OACreate.
you'll be much better off explaining why you think you cannot use sp_send_dbmail for a better answer.
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply