473,508 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web Services email

12 New Member
I have a windows services that sends an email, my problem is it will only send the email when the service is terminated or onStop. What can I do to send the email every time smtp.send is called and not wait till the service is terminated?
Mar 22 '07 #1
3 1060
kenobewan
4,871 Recognized Expert Specialist
Welcome to the site. Please provide more information.
Mar 22 '07 #2
jcatubay
12 New Member
Welcome to the site. Please provide more information.
I have this code in my onStart() method:
SmtpClient smtp = new SmtpClient("smtp.xxx.com");
try
{
smtp.Send(message);
}
catch (SmtpException a)
{
System.Console.WriteLine(a);
}
But for some reason the email is only sent out when the windows service is stopped. Does the message goes to a que and only sent when stopped? How can I make this send email in time intervals? Thanks!
Mar 22 '07 #3
kenobewan
4,871 Recognized Expert Specialist
Does sound like its queing. How long do you have the application open? If you close the application after 5 mins does it send the email then?
Mar 23 '07 #4

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

Similar topics

1
1585
by: BruceGilpin | last post by:
I was at a Microsoft sales presentation last week for the new version of SQL Server, Yukon. They had an extensive presentation on SQL Server and Reporting Services but didn't mention Analysis...
0
1542
by: Fernando Nasser | last post by:
Multiple database services and multiple versions on Red Hat Linux systems The way it works is that we require a specific service script for each database service (that is listening on each port)....
6
2539
by: cs | last post by:
I noticed there is some .net services on my winxp. One or two mention the CLR. Does that mean that my .net apps/services wont run before those services start? I need to run my service as early on...
3
6471
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
3
4970
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
2
2055
by: sdstraub | last post by:
I have created 5 services in my project, in the 1st service I set servicestorun = array of all 5 services, I have a project installer with 5 service installers, one for each service. I have code...
4
1489
by: =?Utf-8?B?QmVu?= | last post by:
Hi, I was wondering whether the Enterprise Library replaces Enterprise Services as a framework for providing services for enterprise apps, or it supplements it. I know nothing of either of...
1
2173
by: Data Entry Outsourcing | last post by:
Data Entry plays vital role in every business area. Data Entry is one such aspects of any business that needs to be handled properly for expanding your business. Data Entry is one of the leading...
4
1199
by: =?Utf-8?B?Um9iIE1pbGxtYW4=?= | last post by:
I am developing a C# client app using VS 2008 that consumes a 3rd party web service. My question is how/where in my IDE/Debugging session can I visually see the actual XML message that is being...
0
7133
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
7336
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,...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5643
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,...
0
4724
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
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
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
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
435
bsmnconsultancy
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...

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.