Jump to content

automatic php email


ianhaney50

Recommended Posts

Hi

 

I just put it in a seperate php file and uploaded it to the web server and has outputted the following on the php page

2015-06-12	14	2015-06-26(111)2015-06-20	 7	2015-06-26(111)2015-07-12	14	2015-07-26(110)

ahh ok so think I will create another visitor with other dates so just to confirm the coding checks for dates outside of the 14 days and 7 days, that right as guessing within 14 and 7 days would be the same result?

 

hope that makes sense?

 

sorry if not

  • Replies 157
  • Created
  • Last Reply

The test script current starts on the 2015-06-12 and queries the data for every day for the next 30 days to see which renewals would be notified by email.

 

So it shows that

  • on the 12th June, renewal 111 for 2015-06-26 was inside 14 days and a notification would be sent.
  • on the 20th June, renewal 111 for 2015-06-26 was inside 7 days and a notification would be sent again
  • on the 12th July, renewal 110 for 2015-07-26 was now inside 14 days and a notification would be sent.

If you are setting this up as a cron job then you would be better logging the emails sent in a file rather than echoing messages to the screen.

 

And no, do not set the test script up as cron job - it will screw up your notification dates. It was merely to test the queries, it's job is done now.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.