473,545 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mail Scheduler

36 New Member
Hi,
I have to design a mail scheduler which sends monthly news letters to all the regiastered users of my website.

Features of scheduler
----------------------------
picks up the email ids of registered users and sends mails.

This scheduler will do this job for every hour or so.

My doubts
------------
How to prevent the scheduler from sending the same mail to the same user more than once.

How can we send different mails to the same user on the same day.


My question is not about sending mails.It is about avoiding duplicate emails.

Thanks in Advance,
shailesh
Oct 13 '08 #1
3 2221
chaarmann
785 Recognized Expert Contributor
Hi,
I have to design a mail scheduler which sends monthly news letters to all the regiastered users of my website.

Features of scheduler
----------------------------
picks up the email ids of registered users and sends mails.

This scheduler will do this job for every hour or so.

My doubts
------------
How to prevent the scheduler from sending the same mail to the same user more than once.

How can we send different mails to the same user on the same day.


My question is not about sending mails.It is about avoiding duplicate emails.

Thanks in Advance,
shailesh
Answer 1: every time a mail is sent successfully, let the scheduler toggle the status of the mail from "not sent" to "sent". So if the scheduler runs again, it skips all the emails with status "sent" and no email is sent twice.

Answer 2: Just give all new mails the status "not sent". So if there is a second mail for the same user on the same day, it just gets sent, too. Run the scheduler to check for unsent mails every hour a day.
Oct 14 '08 #2
shaileshkumar
36 New Member
Thanks,
I will update you when it is finished.

regards,
shailesh
Oct 14 '08 #3
N002213F
39 New Member
assuming persisted object NewsLetter and User, created another other object SentNewsLetter with NewsLetterID and UserID properties.

The NewsLetter object must mave a status isPublished that flag indicates that its ready to be sent. SentNewsLetters will have NewsLetterID and UserID.

After every email has been sent, create a SentNewsLetters object with the NewsLetterID and UserID it was sent to, and persist.

Before your scheduler runs it checks for each published newsletter, which users haven't received it, and sends to those.
Oct 17 '08 #4

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

Similar topics

4
10605
by: keepyourstupidspam | last post by:
Anyone know of a reliable design for a Windows C++ Task Scheduler Class. The scheduler will expose a member function that will add schedules, its parameters will be an interval to run the tasks and a function pointer. This function pointer will be a void* function in other objects that will use the scheduler. So when another object calls...
1
2930
by: Mike Thomas | last post by:
I want to start this thread again - on my first attempt I was a little ambiguous and was not able to get the answer I need. I am trying to start Access 2000 on Windows NT 2000 Server by using the scheduler with the command line: "c:\Program Files\Microsoft Office\Office\msaccess.exe" "d:\Apps\ChangeManagement.mdb" /x StartLoad This...
1
1664
by: Neil Ginsberg | last post by:
I am having trouble using Windows Scheduler with an A2K database that has a password. The password is a db password, not a user-level security password. I have a routine I am looking for Scheduler to run, and, when the password is removed from the database, everything works fine. In that case, the command line I am having Scheduler use is: ...
4
1870
by: LongBow | last post by:
Hello all, I have been working on my first embedded project which has been exciting and stressfull at the same time. My task now is to develop a good scheduler for transmitting ARINC labels. There is about 180 labels that go out over the bus. Each label has a transmission rate of 10 ms to 1000 ms or higher. I need to develop a good...
7
15189
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. I want to have it run automatically as specified by the user. What is the best thing to do and what platforms would it limit me to?
8
2987
by: VMI | last post by:
I'm searching for a way to build a scheduler that will store its data in sql server. I've searched google but it mostly displays sites that sell scheduler controls. Anyone know of any sites that show more or less how to build a simple scheduler control? Thanks.
4
2695
by: Sid Price | last post by:
Is there a .NET (2003) class available somewhere that might provide a comprehensive task scheduler with a better granularity than the one minute of the built-in scheduler on XP? Even down to 15 seconds would be better than one minute. Sid.
3
6002
by: sachin shah | last post by:
hi all my query is how can i send mail by using sql server, i think by unsing xp_sendmail store procedure we can do this but my problem is what paramater to be pass to this store procedure if i want to send mail from my local machine to another user, bcos i am geeting this error msg in query analyzer... query:-EXEC master..xp_sendmail...
1
1887
by: =?Utf-8?B?YXVzdGlyb2I=?= | last post by:
Hi, While I realise that this may not be a very nice solution architecturally, I kick off a Scheduler in an ASP.NET 2.0 webservice in Application_Start() which is supposed to call a stored proc in a database once a day every day. The code works on the day that the webservice is deployed, but not on subsequent days unless I restart IIS. ...
0
7484
marktang
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...
0
7415
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7675
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7440
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7775
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 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...
0
5997
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1902
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
1
1030
muto222
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.