473,399 Members | 3,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Retry a task automatically

Hi..

I m senging email notifications through my ASP.net application to a set of
users. The requirement is such dat when the user posts a new request (the system is a helpdek system) , the administrator and 2 technicians have to get notified.The system creates a new mailMessage object and sends out
the email. But my problem is , in case this mailing funtionality fails, how can I make the application retry sending emails?
If i am to keep track if the notifications are not sent, at which point can i put the retry sending mails function, like at the page_load, application_start etc.

Thanks a lot in advance.
Dec 6 '07 #1
2 2001
shweta123
692 Expert 512MB
Hi,

In case you get error while sending the mails , you can handle that error using Try and Catch statement in the same procedure.
e.g.

Sub SendMail()
Try
//here your mail sending code is there
Catch ex as Exception
//call the function to resend the mail
End Try
End Sub


Hi..

I m senging email notifications through my ASP.net application to a set of
users. The requirement is such dat when the user posts a new request (the system is a helpdek system) , the administrator and 2 technicians have to get notified.The system creates a new mailMessage object and sends out
the email. But my problem is , in case this mailing funtionality fails, how can I make the application retry sending emails?
If i am to keep track if the notifications are not sent, at which point can i put the retry sending mails function, like at the page_load, application_start etc.

Thanks a lot in advance.
Dec 6 '07 #2
I va used the try, catch method in the mailSender method, but that guarantees the sending of the current message only ie. I m calling the same method 3 times to notify 3 users. There can be a case where only 1-2 users get the notification. I want to make sure all three get notified.Will putting all 3 addresses in the To collection of mailMessage will be a solution? Even if that works may I know if there's any other method of calling a function (retry calling a function) automatically in ASP.net . (like calling windows services etc. )
Dec 6 '07 #3

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

Similar topics

7
by: Robert Brewer | last post by:
Alex Martelli wrote in another thread: > One sign that somebody has moved from "Python newbie" to "good Python > programmer" is exactly the moment they realize why it's wrong to code: > > ...
4
by: Christina | last post by:
Dear All, How can I pop up the windows task scheduler inside of my .net application? Such as I have a button called Schedule Now, after clicking it, the Add Scheduled Task window will pop up,...
0
by: John Black | last post by:
Hi, I am wondering what's the best design pattern for such task: There are some requirement for resource allocation scheme, the requirements are not equally important, in another words, when it is...
7
by: Shane Story | last post by:
Have an app and would like to allow easy addition of MYAPP.EXE /F /P (for example) my prog with command line args, as a job to be run. Would like to make it easier on the user to run the app. ...
7
by: Antoine De Groote | last post by:
Hi, I hope I don't upset anybody by comparing Python to Ruby (again). Is there something like Ruby's retry keyword in Python? I couldn't find any thing... Regards, antoine
8
by: Adil Akram | last post by:
There are situations where you want to retry/rerun the same code again (if user wants) for unlimited times for a particular exception thrown. For example in situations like there's no CD in the...
3
by: mayur_hirpara | last post by:
Hi, I am writing a VB.NET application. It is a Windows application at the moment. The application contains a button. the click event of button perform a long running task. It needs to be started...
0
by: jmartmem | last post by:
Greetings, I have an Outlook 2007 task that I saved from an Access 2007 database. Specifically, the task contains a "Run Export" command button in the Access group to export an Access report into...
0
by: jmartmem | last post by:
Greetings, I have an Outlook 2007 task that I saved from an Access 2007 database. Specifically, the task contains a "Run Export" command button in the Access group to export an Access report into...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
tracyyun
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...
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,...
0
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...

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.