Could not instantiate mail function. Topic is solved

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
mollcons
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Sun Nov 20, 2011 11:50 pm

Could not instantiate mail function.

Post by mollcons » Wed Apr 24, 2024 7:48 pm

I am trying to configure a new email within ACYMailing to a newsletter group. When I attempted to send a test to two administrators, it refused to send quoting the error in the Subject.

I then attempted to perform a normal test email from the Global Administration function and got the same error.

This functionality was working fine a couple of months ago but today it fails. WHY??

My site is hosted on IONOS. My Joomla version is 4.4.4. The mail function is set to PHP and the PHP version is 8.2.

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9777
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Could not instantiate mail function.

Post by AMurray » Wed Apr 24, 2024 9:47 pm

Please post the FPA report (see red box, top of the screen - Forum Post Assistant). That should tell us if PHPMail is enabled.

I'd suggest it could be PHPMail itself that is the problem. I think that's tied to the PHP version you're using i.e. it may not be enabled for PHP 8.2. Check your hosting control panel (Plesk?) and see if you can enable PHPMail. Ask your host if not sure.

Another suggestion for testing - create an email account in your hosting - and use that. Set up the SMTP option in Joomla and test if that will send the email. SMTP method is more reliable/secure than PHPMail.
Regards - A Murray
General Support Moderator

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30976
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Could not instantiate mail function.

Post by Per Yngve Berg » Thu Apr 25, 2024 5:00 am

In the Cpanel the email account must be enabled for the site.

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1657
Joined: Tue Jun 30, 2020 12:17 pm

Re: Could not instantiate mail function.

Post by Pavel-ww » Thu Apr 25, 2024 7:36 am

mollcons wrote:
Wed Apr 24, 2024 7:48 pm
This functionality was working fine a couple of months ago but today it fails. WHY??
Hi.

This is a problem on the hosting side - contact support.
It happens that hoster turns off the PHP Mail function if the site is suspected in spam, which often happens when using Acymailing.

When using Acymailing, knowledge of the domain mail working processes and antyspam policy of the e-mail services is required for fine tuning.

Frequent reasons for this:
1) Using a private email for the site, such as [email protected] - should be [email protected].
3) Lack of resource records such as DKIM, DMARC.
4) IP of your site is in the antyspam data bases.
5) The subscription form is not sufficiently protected.
6) There is no confirmation email of the subscription for the user (Double Opt-In).
7) Hacking your site with the introduction of malicious
8 ) The use of mailing is prohibited by hosting rules. Very often found. Before using Acymailing, you should read the Hosting Rules.

--
AMurray wrote:
Wed Apr 24, 2024 9:47 pm
SMTP method is more reliable/secure than PHPMail.
Is not. This is an order of magnitude more slow and only because of this is considered safe. And not suitable for Acymailing

mollcons
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Sun Nov 20, 2011 11:50 pm

Re: Could not instantiate mail function.

Post by mollcons » Thu Apr 25, 2024 9:18 am

Finally resolved this, by switching to use SMTP (with SSLTLS, of course).

IONOS will get back to me with explanation of why they have effectively stopped allowing PHPMail.

Many thanks to all of you for your help.


Post Reply

Return to “Administration Joomla! 4.x”