Jump to content

automatic php email


Go to solution Solved by Barand,

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

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.