Warning: Could not instantiate mail function Topic is solved

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
apsorg
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Sep 06, 2016 3:04 am

Warning: Could not instantiate mail function

Post by apsorg » Thu Dec 01, 2022 11:58 pm

hello,

after upgrading from 3 to 4 i now cannot send emails. i get 2 sets of errors.

1. Warning: Could not instantiate mail function.
2. Error 500.

using casseopeia
https://vaps.org.au/about-vaps/contact-committee.html

using my template
https://vaps.org.au/about-vaps/committe ... rolfe.html

i use smtp to send emails however i get the same results if changed to php.
when sending a test email through the config. works fine. contact form also works but its using Page Builder Pro. that works. basically cannot successfully send an email to a contact set up through the Contact Component. :(

Does anyone know how i can fix this or point me in the right direction to a fix?

cheers, stella.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42388
Joined: Sat Apr 05, 2008 9:58 pm

Re: Warning: Could not instantiate mail function

Post by Webdongle » Fri Dec 02, 2022 1:57 am

https://forumpostassistant.github.io/docs/ please
Also are you using your Host' email server for your site email address e.g. [email protected] vaps .org.au
When I click your first link the page looks like css is not being read
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 15501
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Warning: Could not instantiate mail function

Post by toivo » Fri Dec 02, 2022 6:32 am

About the message 'Could not instantiate mail function' from the PHPMailer sending library in Joomla: check that the email addresses are in the correct format.

A similar issue with the Joomla Contact Form not sending emails was reported a couple of months ago in the forum topic Contact form not sending emails. The issue was resolved after the option 'Custom Reply' in the tab Mail Options of the menu item type Single Contact was turned off.
Toivo Talikka, Global Moderator

apsorg
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Sep 06, 2016 3:04 am

Re: Warning: Could not instantiate mail function

Post by apsorg » Sat Dec 03, 2022 4:49 am

this has been a strange issue. my problem is fixed although i don't know which one of the things i did fixed it or if it was a combination of some/all.

1. removed the com_contact override in my template.
2. changed from php mail to smtp
3. change email in config to one of the same name as the server (website)
4. deleted the menu item that listed the contacts and created a new one

i hope this helps someone else.

cheers stella.


Post Reply

Return to “General Questions/New to Joomla! 4.x”