473,379 Members | 1,542 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,379 software developers and data experts.

Mail Scheduler

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 2216
chaarmann
785 Expert 512MB
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
Thanks,
I will update you when it is finished.

regards,
shailesh
Oct 14 '08 #3
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
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...
1
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...
1
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...
4
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....
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. ...
8
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...
4
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...
3
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...
1
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.