The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Form mail at later date
cedric
post Jun 20 2009, 03:29 AM
Post #1


Member
***

Group: Members
Posts: 42
Joined: 10-June 09
Member No.: 8,846



Hi,
Could someone get me started on how to do this (maybe a link)?
I need some kind of form that sends an email to different persons at a specific time depending on the date of input.
So, I have 3 emails written. I would like to have a form that I can fill in the recipient and choose wich mail should be sent to him.
The only thing is that the email should be sent to him only 1year after the inputdate.
Is this possible?
Or could I do this with javascript only (if possible I would prefer that).?

Thanks alot
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Jun 20 2009, 07:19 AM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



You can only do it with javascript if you are confident that the mail recipients are going to leave the browser window open for the next 365 days!

Yes, it's simple server side programming.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
cedric
post Jun 20 2009, 07:59 AM
Post #3


Member
***

Group: Members
Posts: 42
Joined: 10-June 09
Member No.: 8,846



simple?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
SteveL
post Jul 22 2009, 07:34 PM
Post #4


Newbie
*

Group: Members
Posts: 19
Joined: 25-July 07
Member No.: 3,445



The best solution to your issue is to implement a 'scheduler' system on the server side. Breaking down the steps:

1. Create a database table that will store the email address of the recipient, the time the email should be sent, and a reference to which email should be sent, (copying the text of an identical email to potentially hundreds of records would be incredibly inefficient, so its best to store your email contents in either a flat file or another table).

2. Write a script that searches your table for emails that should go out today, and then sends those emails.

3. Execute the above script on a daily basis using a cron.


If any of the above three steps are beyond your current comprehension, I'm sure that a little bit of research into MySQL, PHP, and Cron's should sort you out.

Steve
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th April 2024 - 12:15 AM