Support Forum

Every time that you post a problem, PLEASE add the Joomla and the extension's versions and revisions (for example: Joomla 3.3.6, Contact Enhanced 3.3.5), PHP version and Server's Operating System. If you only manage only one site it is easier if you edit your profile and just add that information to your signature. Don't forget to add a detailed description of the problem. If possible, write down all steps to simulate the problem.

Before submitting a new post, PLEASE make sure you are running the latest version, test in different browsers (IE, FF, Chrome,..) and clear Joomla and browser's cache after every change you make.

Also, most questions are already answered in our FAQ and in iFAQ and Contact Enhanced documentation pages.

Error: Could not instantiate mail function

6 months 5 days ago #27105 by alan-harries
I have recently upgraded a website to Joomla 4 and I now receive an error when attempting to submit a form from the front end.

I can successfully send a test email from Joomla Global Config using either PHP (which is what I successfully used with Contact Enhanced in Joomla 3) and Sendmail but the Contact Enhanced front end form does not work and gives the following error:

Could not instantiate mail function.
An error occurred and the email was NOT sent.

I tried turning off Send Email in the Contact Enhanced Form settings but still get the same error.

The form is however recorded in the Contact Enhanced backend under Recorded Messages.

I do not want to use SMTP for the emails and would prefer if there is no fix to simply not send them as emails and only record them in the back end as long as the user does not get an error when clicking Send on the form.

Any guidance would be appreciated.

Joomla! 4.3.4 Stable Contact Enhanced 4.3.19.2 Website: www.nhr.org.au

Please Log in or Create an account to join the conversation.

6 months 4 days ago #27108 by support
Dear Alan,

Thank you for contacting us regarding the email functionality in Contact Enhanced.

We would like to inform you that Contact Enhanced utilizes the Joomla core framework for sending emails. However, we do not recommend using the PHP Mail mailer as it is not considered reliable. The PHP Mail function lacks email authentication, which often results in emails being undelivered or marked as spam.

To address the issue you are facing, we kindly request you to follow these steps:

1. Navigate to Components > Contact Enhanced > Tools.
2. Access the Troubleshooting feature.
3. Perform the troubleshooting steps provided in the tool.
4. Please inform us of the results obtained from the troubleshooting process.

By following these steps, we will be able to gather further information and diagnose the root cause of the email problem more effectively.

If you have any additional questions or require further assistance, please feel free to reach out to us. We are here to support you.

Best regards,

Please Log in or Create an account to join the conversation.

6 months 1 day ago #27110 by alan-harries
Hi

Thanks for your response. In relation to the Troubleshooting Steps, I had already reviewed these but for clarity now advise:

1. SPAM filters
Emails from Contact Enhanced were received from my Joomla 3 setup.
Since moving to Joomla4 and testing the Contact Enhanced email functionality I have checked our SPAM filters but no emails were received which is not surprising since the error message from Contact Enhanced indicates they were never sent
Also as advised previously test emails from Joomla Global Config are being successfully sent and received using both PHP and Sendmail.

2. Legal Address
As advised previously test emails from Joomla Global Config are being successfully sent and received using both PHP and Sendmail.

3. Menu configuration
Did this prior to lodging question - it made no difference

4. Custom Reply
Have not tested or changed any settings for cutom reply

5. Authentication
Emails from Contact Enhanced were received from my Joomla 3 setup and test emails from Joomla Global Config are being successfully sent and received using both PHP and Sendmail so pretty sure I do not need authentication

6. On Rochen Servers
Don't know what this means but I have not changed servers and as previously advised the functionality worked in Joomla 3 and also test emails work from Global Config

7. On Linux Servers
Also don't know what this means but again I have not changed servers and as previously advised the functionality worked in Joomla 3 and also test emails work from Global Config

When I change the Global Config setting to Sendmail rather than PHP:
A. I receive the test email from Global Config
B. I receive the following error message from the contact form on my website (rather than the error reported in relation to the PHP setup):
Could not execute: /usr/sbin/sendmail
An error occurred and the email was NOT sent.
C. The form is recorded in the Contact Enhanced back end under Recorded Messages.

As previously advised I do not want to set up SMTP on this website and would rather simply not have the emails sent. The problem with this option is that even if I turn off Send Email in the Contact Enhanced back end the front end user still receives an error message.

Not sure if there is other Troubleshooting you want undertaken as while it says i can run some tests I can't see how to access them without setting up SMTP which as mentioned I am not planning to do.

Thanks

Please Log in or Create an account to join the conversation.

6 months 23 hours ago #27116 by support
Hello Alan,

I understand that you have been experiencing difficulties with the PHP Mail function while using Contact Enhanced. I have thoroughly investigated the issue, but unfortunately, I couldn't identify the exact cause behind the problem. Contact Enhanced relies on the Joomla Framework to handle email sending, so if Joomla is functioning properly in this regard, Contact Enhanced should work as well.

Considering your preference to disable email sending and the fact that you appear to be the only user encountering this specific issue, I have decided not to pursue further investigation into this matter.

To address your concern, I have taken the necessary steps to remove the Error Message associated with the "Send Email" option set to No. This adjustment will prevent any confusion or inconvenience caused by the error message.

Additionally, I will be sending you a fix for this issue via email within the next couple of minutes. Furthermore, I plan to update the installation package within the next one to two days to incorporate the necessary changes.

Thank you for bringing this matter to our attention, and please accept my apologies for any inconvenience caused. If you have any further questions or require any additional assistance, please don't hesitate to reach out to us.

Best regards,

Please Log in or Create an account to join the conversation.

6 months 21 hours ago #27124 by alan-harries
Thank you taking the time to investigate this issue - I understand there is little more you can do to assist in getting the emails to send without my switching to SMTP.
Thanks also for the prompt fix to remove the error message from the front end when Send Email is switched off.
Unfortunately however, while the front end user now receives a "Thank you for your email" message when SEnd Email os switched off in the CE Options, the body of the Recorded Message in the back end is blank.
This only occurs when Send Email is switched to OFF. When it is switched to ON the front end user gets an error message (as expected given email sending is not working) but the body of the Recorded Message in the back end includes the information from the form (refer attached images)
I also note the From in the list of Recorded Messages is different (refer attached image) - the bottom 2 messages were sent when Send Email was ON and the top 3 were sent when it was OFF.
Have I missed a setup step or option I need to change in addition to switching Send Email off.
All the messages included in the attached images were sent after installing the latest version you emailed the link for.
Attachments:

Please Log in or Create an account to join the conversation.

5 months 2 weeks ago #27160 by alan-harries
While I did not end up getting the email to end on my website due to issues beyond the scope of the ContactEnhanced component which included the fact I was unwilling to switch to SMTP, IdealExtensions spent considerable time assisting in getting the workaround of turning Send Email off to work successfully so that the front end user can 'send' a message (that is not actually emailed) without seeing an error with the 'sent' message being saved to the ContactEnhanced backend for me to access in Recorded Messages.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Copyright © 2018 IdealExtensions.com. All Rights Reserved.

This site is not affiliated with or endorsed by the Joomla!™ Project. It is not supported or warranted by the Joomla!™ Project or Open Source Matters™. The Joomla!™ logo is used under a limited license granted by Open Source Matters™, the trademark holder in the United States and other countries.
We may collect your IP address and your browser's User Agent string while using our site for security reasons and deriving aggregate information (analytics). This information is retained for a minimum of 1 and a maximum of 24 months.
Feedback