I have a few CRED forms for creating / editing CPTs. They are set to notify specific users via email on submission of the form.
I'm occasionally getting an error "Could not instantiate mail function." on the top left of the page and not getting the notification emails in such instances.
My site is hosted on Flywheel and I've checked with them - but they have confirmed no issue on their side.
I noticed a couple of other people also were facing this error, but did not find a solution. Could you please help resolve?
The Threads in the forum I see with this issue where all related to some Custom Codes or server issues.
I can not reproduce this problem neither locally nor online.
Mostly this is caused by Apache misconfiguration, php.ini misconfiguration or even restrictions by the Host on what email can send to which email
As example, you often are limited to use email@your-domain-name.com by many Hosts.
All the rest will get blocked.
This would require actions by the Host.
To address the issue better I need to know exactly when under what circumstances this error is happening, as it seems, it's not a general issue but a sporadic issue, it must be due to some specific settings present in the form/email/receiver/emitent.
Can you provide me details about when this happens?
Thank you
Hi Beda,
As I mentioned, the error is infrequent / intermittent thus making it difficult to come across.
There doesn't seem to be any particular pattern - it occasionally comes when I click a link to add a CPT from the frontend via CRED form - and even when it does come, doing a simple REFRESH makes it go away.
The hosting company has re-checked and confirmed that there are no issues at their end and this error is not due to any policy set by them.
They however found few errors in the PHP logs related to CRED:
PHP Catchable fatal error: Object of class __PHP_Incomplete_Class could not be converted to string in /www/wp-content/plugins/cred-frontend-editor/embedded/toolset/toolset-common/toolset-forms/classes/class.types.php on line 536
Perhaps this is useful to you to troubleshoot. Could you please help resolve this?
Are you sure that your Toolset is up to date?
Please can you confirm that you updated the latest shipped versions?
Your Debug Informations tell me those are outdated, but you started this Thread before the updates so I can not be sure here.
This error is not present in updated installs.
Can you confirm the issue is happening too on updated Toolset and WordPress?
In that case, I would need a sites snapshot if possible.
We usually recommend the free Plugin "Duplicator" for this porpoise.
If you already know how Duplicator works
(http://wordpress.org/plugins/duplicator/),
please skip the following steps and just send me the installer file and the zipped package you downloaded.
★ Duplicator Instructions
hidden link
Send me both files (you probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big)
❌ IMPORTANT ❌
Remember to create or keep an admin account for me before creating the snapshot, or I won't be able to login. You may delete the new admin account once the snapshot has been built.
I will enable your next answer as private so you can provide me the information securely.
Thank you