April 1, 2008 at 6:56 am
I am working on a Application where need to send mail using StoreProcedure.
I have done it through CDONTS.DLL But this rely Over SMTP Server..DO we have any Provision where in we cn do the same thing without relying on SMTP?
Any Help will be Greatly Appriciated.
Vijay
April 1, 2008 at 2:12 pm
You can use xp_sendmail (available also on 2000)
but you need to configure a MAPI profile
See here http://msdn2.microsoft.com/en-us/library/ms189505.aspx
I hope this helps!
April 1, 2008 at 2:26 pm
Read up on database mail and sp_send_dbmail in BOL. There are several examples in BOL that should help get you started.
http://msdn2.microsoft.com/en-us/library/ms175887.aspx
http://msdn2.microsoft.com/en-us/library/ms190307.aspx
Tommy
Follow @sqlscribeApril 2, 2008 at 3:48 am
Thanks TOmmy!!!
I tried this but I get error when i Set the Profile Name. I dont know wht to Set over there. And it say Profile name not set globaly need to specify.
May i know wht should i set???
April 2, 2008 at 6:50 am
If you already have a mail profile created you need to execute the sysmail_add_principalprofile procedure to grant it access to the msdb database and to make it the default (global) profile. Check out this article:
http://www.databasejournal.com/features/mssql/article.php/3626056
Tommy
Follow @sqlscribeApril 2, 2008 at 9:57 am
Thanks a lott..
April 2, 2008 at 10:11 am
NP 😀
Tommy
Follow @sqlscribeViewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply