April 6, 2009 at 6:07 am
Hi All,
I want to generate an email from my database. I have tried it lot of time by reading a lot of forums. But I still unable to generate the email....
I want to generate the email by using windows authentication......
Please help me and tell me the requirement to generate the email from database.
Thanks in advance.
April 6, 2009 at 6:27 am
Kailash Mishra (4/6/2009)
Hi All,I want to generate an email from my database. I have tried it lot of time by reading a lot of forums. But I still unable to generate the email....
I want to generate the email by using windows authentication......
Please help me and tell me the requirement to generate the email from database.
Thanks in advance.
Are you trying to set up Database mail here? What problem you have? how did you confirm that its not working?
April 6, 2009 at 6:41 am
Have you tried using the xp_smtp_sendmail in master? If not i'll send you an example;-)
April 6, 2009 at 6:51 am
ksparke (4/6/2009)
Have you tried using the xp_smtp_sendmail in master? If not i'll send you an example;-)
Nope
April 6, 2009 at 7:10 am
Check master DB for the XP_SMTP_SENDMAIL extended stored proc or download xpsmtp80.dll and add it as an extended stored proc
Create the proc below and send it @TO,@CC,@Subject,@Message
Make sure the @server variable is set to the mail server I.P
Create procedure sp_mail
@TO varchar(8000),
@cc varchar(8000),
@Subject varchar(500),
@Message varchar(8000)
as
declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM = N' ', --Your email add
@FROM_NAME = N' ', --Add name to address
@replyto = N'',
@TO = @TO,
@BCC = N'',
@priority = N'NORMAL',
@subject =@Subject,
@type = N'text/plain',
@message =@Message,
@messagefile= N'',
@attachment = N'',
@attachments= N'',
@codepage = 0,
@timeout = 10000,
@server = ' ' --add mail server i.p here
April 6, 2009 at 10:57 pm
Thanks all,
I downloaded the XPSMTP80.DLL and added it in database. Now I able to generate the mail.
But I think that the dll file XPSMTP80 was made by some person with the scripting, which I downloaded from the http://www.sqldev.net.
But I am unable to understand how it works, because we can't see the code....
Can someone tell me...
Thanks to all.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply