I'd like to give this all some more testing. I think my staging site doesn't play properly because it has an Under Construction plugin.
I just had two emails in from my live site from a Supplier that'd I'd made pending 'manually'. The Expiry date is not until 27th Dec and the email is set to fire 8 days before the expiry date. One is from the ADD cred form, the other from the EDIT cred form (I can tell that as set up the same but the wording of the email is slightly different). I know this is a different 'issue' and I should start a new thread, but I'm not sure emails that have a time set 'before the automatic expiration date' are very 'stable' or is there something I should have done in the back end? Further to this the email says: 'To renew click account. If you are already logged in you will be taken directly to your Account, otherwise enter your login details under ‘Login here’ and select Account in the top menu. The Renew Listing button will be available on your Account page for eight days before your listing expires on 31/10/2017, after which please contact us on 01834 860338 or email us.' So the date in the email does not tally up with the back end (I may have amended this manually in the back end too). It really needs some more testing or something to stop the date amendment in the back end if this won't work.
If I sent you my site (it's pretty large now), could you import to a testing area and let me test all these email issues again?
I can set up a Server where I can show you that it works.
I will not send emails but use an Email Log Software that reads the Servers emails and logs them.
Also please note that CRED hooks in a WordPress CRON and that works only when the website is pinged.
Hence our test servers are useless for this and we instead use Custom CRON events (still WordPress but faster, one minute).
This events can be triggered manually and so we can control that the code works.
Issues with dates are known, in the sense that there is a general "mess" in how dates are displayed in WordPress in general, in my opinion.
Let's just take the examples of winter and summer time. Or the differences in actual local time and what I see as the post saved time, even if my local time in the settings of WordPress is correct.
CRED also presents some issues here. I saw for example that in summer time CRED assumes a publication time of +2 hours.
In winter, it's correct. I am aware of this and will step by step escalate each of the issues.
This needs careful review because several of these things have been working like that for years now. Users where eventually adapting to it - without reporting it and we did not see either. Hence now there are several sites using this features and if we just go in and change everything (even if to the correct way) we may break things.
Hence backwards compatibility is important.
But the issue that we discuss here is not affected by these things.
Let me show you:
1. Set up a simple local test site with CRED and all needed plugins.
2. Please also install https://wordpress.org/plugins/wp-crontrol/ + https://wordpress.org/plugins/log-emails/
3. With wp-crontrol set a new CRON Event of one minute
4. In Toolset > Settings > Forms choose the one Minute CRON to use on Post Expirations in Forms
5. Set up a form as required:
- has an email field
- creates post of a certain type
- expire in 10 minutes
- notification to email field 5 minutes before expire
6. Submit this form twice each as a separate user and pass each a separate email
7. Wait for the CRON to trigger or trigger it manually with wp-crontrol
8. with log-emails see that exactly 2 emails are sent. Both to the right email.
If you do not receive them, that is a different issue.
It might be (example) google inbox limitation (as in groups) or others. But the email is sent. It's handled by wp_mail, otherwise it would not be logged.
Now, I suggest either how to proceed like this:
- test it as above suggested
- it will show that the issue is fixed
- test on the real site
==> it should fix the issue there too.
Otherwise this is logically a different issue, and I really recommend to (no matter what) open a new ticket with a concise description or steps in case it's not solved.
Not in order to not help you - the opposite.
See, this thread here is simply not controllable anymore.
Anyone who needs to cover me will be lost.