473,473 Members | 2,153 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Procedure to send an email to a customer using procedures in SQL Server 2000

7 New Member
Hi,

Can you please tell what is the procedure in SQL Server 2000 to automatically send an email to the customer. I know that we can do it in DTS Packages. But what should be the code in the procedure to send a mail.

I've a code in the following link but I'm afraid its giving some errors. Kindly check the link

--

http://support.microsoft.com/kb/312839


I'll be very thankful if someone could really help me out.

Thanks in advance.
Dec 20 '06 #1
2 1578
iburyak
1,017 Recognized Expert Top Contributor
To send an e-mail from SQL server you have to have Microsoft Outlook or
other e-mail service installed on your server.
Also it should have generic mail account on it.
Due to security reasons it is not allowed to have an e-mail service on a server in my company so see what I do instead to send an email to msql_dba team through some_e_mail.exe that is standard built in my company. You can run any exe from xp_cmdshell with parameters the same way as you do from command prompt. Hope it will help you somehow.

[PHP]Declare @msg varchar(1000)
BEGIN
RAISERROR ('The replication latency is too high please investigate',16, 1)
select @msg = 'c:\PROGRA~1\autoproxy\ some_e_mail btell -mail msql_dba "Replication Latency on server: ' +@@servername + ' Hrs '+rtrim(cast(@h as char))+' Min '+ rtrim(cast(@m as char))+'"'
exec master..xp_cmdshell @msg
END[/PHP]
Dec 22 '06 #2
AricC
1,892 Recognized Expert Top Contributor
Why don't you send the email via PHP or another scripting language?
Dec 22 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Micah Gentry | last post by:
Is there any way to allow a user to use the xp_cmdshell extended stored procedure without giving that user execute permissions to xp_cmdshell in SQL server 6.5? Let me clarify. Lets say I (as the...
12
by: serge | last post by:
I have an SP that is big, huge, 700-800 lines. I am not an expert but I need to figure out every possible way that I can improve the performance speed of this SP. In the next couple of weeks I...
1
by: Karl | last post by:
Hi, I am trying to put SQL Server Stored Procedures into Sourcesafe as per the Microsoft Knowledge Base article 818368, but have run into a problem. The web server is SQL Server 2000 running on...
1
by: Mark Dicken | last post by:
Hi All I have found the following Microsoft Technet 'Q' Article :- Q210368 -ACC2000: How to Pass an Array as an Argument to a Procedure (I've also copied and pasted the whole contents into...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.