September 14, 2007 at 11:07 am
Is it possible to receive emails from SQL Server 2000?
September 14, 2007 at 11:49 am
Yes. You would use SQL Mail. This requires a mapi client to be installed on the server (Outlook, not Outlook Express).
September 14, 2007 at 12:09 pm
Hi lynn,
Thanks for information.
September 17, 2007 at 8:59 am
I know there is two places to set it. There is SQL Mail and also for the SQL Server Agent. If you're looking to receive mails from jobs that your are running, don't forget to set the SQL Server Agent as well. Rigth click on "SQL Server Agent" and go to properties. Then set it in there.
Correct me if I'm wrong, but I believe you setup SQL Mail just so you can call it from queries or stored procedures.
September 17, 2007 at 9:19 am
Try this link. It works great with DTS packages.
September 18, 2007 at 12:23 am
see next post (somthing went wrong posting it)
September 18, 2007 at 12:27 am
Gate Crusher,
For the SQL 2000 environment we use the XP_SMTP_SEND_MAIL procedure;
Copy the appropriate DLL into the BINN directory
Register this DLL within SQL server
ready for use (script example);
--Within the declare section of a SP
----------MAIL section -----------------------------------------------------------------------------
declare @rc int
declare @sent_email_to varchar(80)
declare @sent_email_cc varchar(80)
declare @sent_email_subject varchar(140)
declare @sent_email_message varchar(8000)
declare @attachments_details varchar(400)
set @sent_email_to = 'someone@somehost.com'
set @sent_email_cc = ''
set @sent_email_subject = '<title of you e-mail>'
set @sent_email_message = '<E-mail body (can be assemble dynamicly)>'
set @attachments_details = '\\somesever\path\file'
-----------------------------------------------------------------------------------------------------
<< your main stript here >>
-----------------------------------------------------------------------------------------------------
set @sent_email_message = 'whatever you want to sent'
@FROM = N'return adres@somehost.com',
@TO = @sent_email_to,
@cc = @sent_email_cc,
@subject = @sent_email_subject,
@message = @sent_email_message,
@attachments = @attachments_details,
@server = N'mail.<your_server>.com'
select RC = @rc
-----------------------------------------------------------------------------------------------------
Hope this offers new opportunities,
Regard,
GKramer
The Netherlands
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply