cancel
Showing results for 
Search instead for 
Did you mean: 

Email form 'queuing' solution

Borovere
Newbie
Posts: 5
Registered: ‎26-07-2007

Email form 'queuing' solution

Hi All,
I'm looking for a web development suggestion!  Roll_eyes
How would you suggest I go about creating the following:
I have a form on a web page that is emailed to 3 different recipients. When the form is submitted, only recipient A should receive the submission. The next submission should go to recipient B and the next to Recipient C and then back to recipient A and so on.
Any idea on a good way to achieve this?
Regards,
Jeff
4 REPLIES 4
samuria
Grafter
Posts: 1,581
Thanks: 3
Registered: ‎13-04-2007

Re: Email form 'queuing' solution

Give us a clue what are you using that can achieve this ie PHP, HTM, Asp mysql.
You would need a file or database to recorded what the last number used was 1,2,3 and then add one unless its greater than 3 in this case it = one
hadden
Grafter
Posts: 486
Thanks: 2
Registered: ‎27-07-2007

Re: Email form 'queuing' solution

A few thoughts, without any claim to any being practical Smiley ...
1. If the same person submits the form each time, then you could set a cookie on that persons PC.
2. If the page is not hosted on a server then include a call to an external hit counter each time the page is submitted. To determine the email address for each submission, read the submission count divide by three and use the remainder to determine which of the three recipients you want.
3. Use one of several server based solutions to remember which recipient receive the last submission email.
4. If the requirement is to get approximately one third of the submissions to got to each recipient then do something like send all morning submissions to one recipient, all afternoon recipients to the second recipient and all evening submissions to the third recipient. If the balance isn't even between the recipients then adjust the above time bands accordingly.
MrC
Grafter
Posts: 525
Thanks: 4
Registered: ‎17-07-2008

Re: Email form 'queuing' solution

Quote from: Borovere
Any idea on a good way to achieve this?

Possibly - if it was me I'd be looking at performing the mail processing serially and completely separately from the web interface to avoid various potential problems. In other words on the web server just treat all form submissions the same and save the relevant info, say as separate files in a directory. Then have a separate process that just wakes up now and again and checks the directory and sends the forms to whoever and in whatever order you want. You can keep the count of emails in memory (if you're not that fussed about it losing count if the process dies), or just update a file somewhere. As you're processing serially, locking etc isn''t a problem. It's nice and easy to keep copies of what's been sent as well by atomically moving the files once processed.
Mike
BestPump
Grafter
Posts: 42
Registered: ‎19-09-2007

Re: Email form 'queuing' solution

Thanks for the suggestions, all.
I've only dabbled a little in PHP, ASP etc. as I'm more of a front-end designer.
Is there a chance I could find something like this online to modify or should I be outsourcing?
Jeff