473,583 Members | 3,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

7 New Member

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



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

Thanks in advance.
Dec 20 '06 #1
2 1584
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)
RAISERROR ('The replication latency is too high please investigate',16 , 1)
select @msg = 'c:\PROGRA~1\au toproxy\ some_e_mail btell -mail msql_dba "Replicatio n Latency on server: ' +@@servername + ' Hrs '+rtrim(cast(@h as char))+' Min '+ rtrim(cast(@m as char))+'"'
exec master..xp_cmds hell @msg
Dec 22 '06 #2
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

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 dbo) create a stored procedure called sp_send_err: CREATE PROCEDURE sp_send_err @CompID varchar(20) AS declare @strCMD varchar(255) select...
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 will work on preparing SQL statements that will create the tables, insert sample record and run the SP. I would hope people will look at my SP and...
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 Windows 2003 Server. The client dev environment is Visual Studio 2003 Enterprise Developer Edition. I have carried out the following steps...
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 the bottom of this email)
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.