ianhaney50 Posted June 25, 2015 Author Share Posted June 25, 2015 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 Quote Link to comment https://forums.phpfreaks.com/topic/296918-automatic-php-email/page/7/#findComment-1514939 Share on other sites More sharing options...
Barand Posted June 25, 2015 Share Posted June 25, 2015 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. Quote Link to comment https://forums.phpfreaks.com/topic/296918-automatic-php-email/page/7/#findComment-1514940 Share on other sites More sharing options...
ianhaney50 Posted June 25, 2015 Author Share Posted June 25, 2015 Ahh ok that's perfect so if I set that up as a cron job as well to check every day? Quote Link to comment https://forums.phpfreaks.com/topic/296918-automatic-php-email/page/7/#findComment-1514942 Share on other sites More sharing options...
Barand Posted June 25, 2015 Share Posted June 25, 2015 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. Quote Link to comment https://forums.phpfreaks.com/topic/296918-automatic-php-email/page/7/#findComment-1514959 Share on other sites More sharing options...
ianhaney50 Posted June 25, 2015 Author Share Posted June 25, 2015 Ahh ok cool so I just keep the test script php file on the web server or can it be taken off the server now? Quote Link to comment https://forums.phpfreaks.com/topic/296918-automatic-php-email/page/7/#findComment-1514976 Share on other sites More sharing options...
Barand Posted June 25, 2015 Share Posted June 25, 2015 It was only to help with testing. If you have finished testing it can go. Quote Link to comment https://forums.phpfreaks.com/topic/296918-automatic-php-email/page/7/#findComment-1514978 Share on other sites More sharing options...
ianhaney50 Posted June 25, 2015 Author Share Posted June 25, 2015 Ahh ok cool so the auto-email.php script will now send emails if the renewal_date is 14 days away and then send another if 7 days away, that right? Quote Link to comment https://forums.phpfreaks.com/topic/296918-automatic-php-email/page/7/#findComment-1514979 Share on other sites More sharing options...
Barand Posted June 26, 2015 Share Posted June 26, 2015 You tell me, you're the one doing the testing Quote Link to comment https://forums.phpfreaks.com/topic/296918-automatic-php-email/page/7/#findComment-1515026 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.