Could not instantiate mail function

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.
Locked
X-Bumble
Joomla! Explorer
Joomla! Explorer
Posts: 447
Joined: Sat Feb 02, 2008 12:39 pm
Location: England
Contact:

Could not instantiate mail function

Post by X-Bumble » Wed Mar 05, 2008 8:33 am

Hi All,

I have just created a new Super Administrator via the back-end in Joomla 1.5.1.

It has created the user OK, but an error popped above which reads;
! Could not instantiate mail function.
Could anyone please help me with what this means and what I need to do to rectify it?

Many thanks.
Michael Edwards - UK Web developer and Designer - http://www.michaeledwards.me.uk

igrimpe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 234
Joined: Wed Feb 20, 2008 8:59 am

Re: Could not instantiate mail function

Post by igrimpe » Wed Mar 05, 2008 10:37 am

Site -> Global Configuration -> Server -> Mail Settings
Set to "PHP Mail function"?
Try with sendmail or SMTP.
mail() might be not available on your system:
http://www.php.net/manual/en/ref.mail.php

X-Bumble
Joomla! Explorer
Joomla! Explorer
Posts: 447
Joined: Sat Feb 02, 2008 12:39 pm
Location: England
Contact:

Re: Could not instantiate mail function

Post by X-Bumble » Wed Mar 05, 2008 10:49 am

Hmmm,

I changed it to Sendmail and now get:
PHPMAILER_EXECUTE/usr/sbin/sendmail
Is this something I need to bring up with my hosting company?
Michael Edwards - UK Web developer and Designer - http://www.michaeledwards.me.uk

igrimpe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 234
Joined: Wed Feb 20, 2008 8:59 am

Re: Could not instantiate mail function

Post by igrimpe » Wed Mar 05, 2008 11:27 am

/usr/sbin/sendmail is the correct path to sendmail (though this is more or less standard on any linux) ?
"from" email is a valid email account on that server (dunno if this is needed, but it won't hurt) ?

X-Bumble
Joomla! Explorer
Joomla! Explorer
Posts: 447
Joined: Sat Feb 02, 2008 12:39 pm
Location: England
Contact:

Re: Could not instantiate mail function

Post by X-Bumble » Wed Mar 05, 2008 11:34 am

I've fixed it by using the SMTP option instead.

Cheers for the help, it set me off in the right direcion. :)
Michael Edwards - UK Web developer and Designer - http://www.michaeledwards.me.uk

KThackston
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Sat Sep 06, 2008 11:31 pm

Re: Could not instantiate mail function

Post by KThackston » Sun Sep 07, 2008 5:27 pm

I've tried setting it to all 3 options and I get mostly the same errors.

PHPMAILER_EXECUTE/usr/sbin/sendmail when set to sendmail
or
Could not instantiate mail function. when set to PHPMail
or
PHPMAILER_RECIPIENTS_FAILED when set to SMTP



in all instances my settings are:
Mail from name@email.com
From Name MyName
Sendmail Path /usr/sbin/sendmail
SMTP Authentication YES
etc.

any thoughts?

User avatar
smithveg
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Thu Jun 29, 2006 7:27 am
Contact:

Re: Could not instantiate mail function

Post by smithveg » Tue Feb 03, 2009 6:46 am

I've the same problem here.
The joomla is running in windows server. Neither an options work.

Same error i get as, KThackston. Any helps?
You do not have time to think about failure.
Signature Rules: http://forum.joomla.org/viewtopic.php?f=8&t=65

KThackston
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Sat Sep 06, 2008 11:31 pm

Re: Could not instantiate mail function

Post by KThackston » Sat Feb 14, 2009 11:16 pm

I'm getting this error from the Contact Us page:

PHPMAILER_RECIPIENTS_FAILEDkatherine@mywebsite.com

I've triple checked my settings. I use Joomla for another site on the same server and I do not have any issues at all. I've checked to make sure my input is all correct, but I keep getting these errors.

can anyone help here?

X-Bumble
Joomla! Explorer
Joomla! Explorer
Posts: 447
Joined: Sat Feb 02, 2008 12:39 pm
Location: England
Contact:

Re: Could not instantiate mail function

Post by X-Bumble » Sun Feb 15, 2009 10:57 am

If you go to the forum search area and type

PHPMAILER_RECIPIENTS_FAILED

As the keywords, you'll get loads of suggestions as to how to fix this. :)
Michael Edwards - UK Web developer and Designer - http://www.michaeledwards.me.uk

User avatar
smithveg
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Thu Jun 29, 2006 7:27 am
Contact:

Re: Could not instantiate mail function

Post by smithveg » Mon Feb 16, 2009 4:35 pm

Finally i solve this problem by the method of SMTP.

I create a dummy email for example, nothing@domain.com with a password.
After that i configure this email account and the password into Joomla! admin configuration page.

Then, Go back to the contact page. And input my real email for example, enquiry@domain.com.

Go the the front-end make a test mail. It worked!
You do not have time to think about failure.
Signature Rules: http://forum.joomla.org/viewtopic.php?f=8&t=65

webone
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Tue Sep 23, 2008 5:16 am

Re: Could not instantiate mail function

Post by webone » Wed Mar 11, 2009 3:11 am

Try using SMTP and leaving the authentication off.

mainstwebguy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 118
Joined: Fri Aug 29, 2008 11:40 am
Location: Michigan
Contact:

Re: Could not instantiate mail function

Post by mainstwebguy » Wed Jun 10, 2009 5:17 pm

Hello All,

I am also getting the "Could not instantiate mail funciton" message when trying to register a new user in the back end. The user will be created, but that error msg appears at the top and no email is being sent to the new user. I tried registering the new user from the front-end and the user will be created, no message appears, but the email never arrives.

I've tried following the advice here (http://forum.joomla.org/viewtopic.php?f=199&t=170266) but was unable to get the SMTP or sendmail to work either. (producing errors).

I would like to focus on getting the PHP mail() working because i know my server can use that function (i host a website that uses the mail() function for contact forms and it works fine).

I am running a fresh install of Joomla 1.5.11 with no extensions installed.
My webserver is IIS 6 (unfortunately; i know joomla is happier on apache, but the powers that be won't switch)
I'm running php5 and don't have any other problems sending mail with the php function.

I did notice on the phpmailer.php file that the FromName and From email address variables were set to Root and root@localhost respectively. Is this a correct setting or should i update them?

thanks in advance all!
J

287d
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 182
Joined: Mon Jan 05, 2009 4:09 am

Re: Could not instantiate mail function

Post by 287d » Wed Oct 14, 2009 5:24 am

Hi I am having the same issues even though everything was fine upto yesterday.
KThackston wrote:
PHPMAILER_EXECUTE/usr/sbin/sendmail when set to sendmail
or
Could not instantiate mail function. when set to PHPMail

After going mad trying to figure this out I realised that it is occurring after sending out a newsletter via acajoom.
Could this be a block by the host for number of emails sent?

Thanks in advance.

i_am_christine
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Dec 03, 2009 6:40 am

Re: Could not instantiate mail function

Post by i_am_christine » Thu Dec 03, 2009 6:47 am

i'm pretty much new to joomla. i'm trying to have the email working on my local server, is that possible? what configuration should i use?
this is how im currently configured

Mailer : php mail function
Mail from: user@yahoo.com
Sendmail Path: /usr/sbin/sendmail
SMTP Authentication: No
SMTP Security: none
SMTP Port : 25

i have tried some of the configurations above, but none of them work. i must have missed something.
big thanks :) this is going to be cool birthday gift..hehe..my birthday is on the 23th..thanks again

zvezda
Joomla! Apprentice
Joomla! Apprentice
Posts: 40
Joined: Fri Jan 19, 2007 7:07 pm

Re: Could not instantiate mail function

Post by zvezda » Thu Jan 21, 2010 10:13 am

Hey,
you should use same e-mail address in contacts as is you domain.com, than whatever@domain.com and it works. At least with me.

cheers

visicom
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Jan 12, 2010 2:17 pm

Re: Could not instantiate mail function

Post by visicom » Thu Jan 21, 2010 2:06 pm

this is lame - no luck at all sending out email messages via smtp using joomla 1.5.

PHPMAILER_RECIPIENTS_FAILED

Tiadrin
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Jan 26, 2010 11:26 am

Re: Could not instantiate mail function

Post by Tiadrin » Tue Jan 26, 2010 12:42 pm

Hey all,
im in quite a pinch here...
this is my situation.

im running on a localhost and for the site im making i need to get the mailserver working.

my current mail settings are

Mailer: PHP Mail Function
Mail from: info@domain.nl (note that the email does not yet excist due to the site being under devolopment, if there is some temporary solution, please tell me)
From name: sitename
Sendmail Path: /usr/sbin/sendmail (note, i cant actually find this path anywhere on my machine)
SMTP Authencation: no
SMTP Security: none
SMTP Port: 25
SMTP Username: root
SMTP password: joomla
SMTP host: localhost

this gives me the error:
Could not instantiate mail function.

none of the settings in the thread worked so far, can someone please help me?

im running on Windows7 using XAMPP and have command line 5 for MySQL server.

i really need this to get to work, many thanks in advance ^^

DutchPeer
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Jan 26, 2010 9:41 pm

Re: Could not instantiate mail function

Post by DutchPeer » Tue Jan 26, 2010 9:48 pm

Hi people,

Actually, I haven't got a clue on what this is all about. That is ...

I tried to build up a form (jforms) about a month ago on one of my test-sites (subdomain in a hostin-environment). Encountered 0 problems, absolutely NONE. All email-sending was very much OK.

Now, on another subdomain, today, I got this message that has been mentioned above before: cannot instantiate ...

Checked all settings on both the WORKING and the NOT WORKING site, but I cannot find ANY difference. Both are subdomains of the same domain, and one works, the other doesn't.

The stupid thing is, filling the form, you can give your emailaddress. That's the one that DOES get the message that all's been sent ... Very inconvenient.

DutchPeer
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Jan 26, 2010 9:41 pm

Re: Could not instantiate mail function

Post by DutchPeer » Thu Jan 28, 2010 8:02 pm

Found out something more ...

I am running on 1 hosting env. with 2 subdomains. 1 works (all mail sent) other doesn't (only the one entering the form gets a confirmation, admin gest 0).

Dug into phpmailer.php and found out that $to is EMPTY when it builds up the email message wit @mail function. Replaced that with a FIXED emailaddres: works without any problem!

Don't know what to do next, reported this as a possible bug.

hfhs72
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Aug 17, 2006 12:16 pm

Re: Could not instantiate mail function

Post by hfhs72 » Fri Jan 29, 2010 9:19 pm

I have the same exact problem on a brand new install of 1.5.15. I've tried all 3 mail settings with the same results. It will send the copy email but not the "TO" email. Also, I am not getting a confirmation "Your mail has been sent" pop up message. Just blank boxes after pressing the Send button.

Jahmaica
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Feb 16, 2010 6:29 pm

Re: Could not instantiate mail function

Post by Jahmaica » Tue Feb 16, 2010 6:31 pm

thanks a lot! i have set my global config mail settings to SMPT Server and it works now!

DutchPeer
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Jan 26, 2010 9:41 pm

Re: Could not instantiate mail function

Post by DutchPeer » Tue Mar 02, 2010 8:07 pm

Back on the surface again. Posted the issue as abug. look for "Mail function(s) do not work".

iGalin
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Mar 12, 2010 7:54 am

Re: Could not instantiate mail function

Post by iGalin » Mon Apr 26, 2010 9:10 pm

hello everyone,
I had the same problem as everyone else. here is my solution:
1. if you use hosting from BlueHost/HostMonster/FastDomain then go to "Email Delivery Route" under Mail section.
2. enter email that you have problem with and hit "Show Route"
3.1 if it shows "virtual_aliases via virtual_aliases router forced address failure" then go to step 4,
3.2. if it shows "mxi_mailproxy via AAA.BBB.CCC.DDD" then probably problem somewhere else and currently can't offer suggestion there but still send me PM, I ll look into it.
4. Now what happens is server thinks that if he "owns" domain then MX records should be there too which in fact are not there. So go to "MX Entry" in CPanel under Mail section again.
5. Choose domain/add-on w/problem and add/edit MX Records.
I edited this way since I'm using google apps for email but website is on HostMonster:
Priority Destination Actions
10 aspmx.l.google.com Edit Delete
20 alt2.aspmx.l.google.com Edit Delete
6. Then go back to "Mail Delivery Route" and check if now it's OK and then try on website.

Hope it helps.

DutchPeer
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Jan 26, 2010 9:41 pm

Re: Could not instantiate mail function

Post by DutchPeer » Tue Apr 27, 2010 4:12 pm

I think your post more or less confirms my faint idea that this issue is related to running on either a subdomain or "straight from the root" of the site. The issue disappeared as I moved the site to its final destination, where it was placed in the root of course, of the selected domain.

Cheers

Peer

User avatar
holdenburg
Joomla! Apprentice
Joomla! Apprentice
Posts: 48
Joined: Sat Dec 10, 2005 11:56 pm
Location: West Palm Beach, Florida
Contact:

Re: Could not instantiate mail function

Post by holdenburg » Tue Jul 06, 2010 6:17 pm

iGalin wrote:hello everyone,
I had the same problem as everyone else. here is my solution:
1. if you use hosting from BlueHost/HostMonster/FastDomain then go to "Email Delivery Route" under Mail section.
2. enter email that you have problem with and hit "Show Route"
3.1 if it shows "virtual_aliases via virtual_aliases router forced address failure" then go to step 4,
3.2. if it shows "mxi_mailproxy via AAA.BBB.CCC.DDD" then probably problem somewhere else and currently can't offer suggestion there but still send me PM, I ll look into it.
4. Now what happens is server thinks that if he "owns" domain then MX records should be there too which in fact are not there. So go to "MX Entry" in CPanel under Mail section again.
5. Choose domain/add-on w/problem and add/edit MX Records.
I edited this way since I'm using google apps for email but website is on HostMonster:
Priority Destination Actions
10 aspmx.l.google.com Edit Delete
20 alt2.aspmx.l.google.com Edit Delete
6. Then go back to "Mail Delivery Route" and check if now it's OK and then try on website.

Hope it helps.
Trying to follow this and I am on Bluehost. I went to C-Panel and opened the MX Records icon. Not seeing step 5 or I am not understanding. This makes sense about editing the Mx record but I don't use G-Mail/Google - just trying to figure out what changed as PHP Mail worked up until awhile ago. I did change to legacy mode - wondering if this afected anything...
Still not working...

User avatar
holdenburg
Joomla! Apprentice
Joomla! Apprentice
Posts: 48
Joined: Sat Dec 10, 2005 11:56 pm
Location: West Palm Beach, Florida
Contact:

Re: Could not instantiate mail function

Post by holdenburg » Tue Jul 06, 2010 6:23 pm

DutchPeer wrote:Found out something more ...

I am running on 1 hosting env. with 2 subdomains. 1 works (all mail sent) other doesn't (only the one entering the form gets a confirmation, admin gest 0).

Dug into phpmailer.php and found out that $to is EMPTY when it builds up the email message wit @mail function. Replaced that with a FIXED emailaddres: works without any problem!

Don't know what to do next, reported this as a possible bug.
DP...

Will try editing the phpmailer.php
I am assuming you have the setting set on MailPHP function and this is a sub-domain?

thx..

H.

User avatar
bettsaj
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Fri Feb 13, 2009 10:17 am

Re: Could not instantiate mail function

Post by bettsaj » Thu Jul 08, 2010 3:12 pm

I'm having the same issue, however my set up is a little different.


i'm running Joomla on my own web server. The machine is a Windows 2003 server loaded with EasyPHP, that is Apache, PHP & MySQL. Microsoft IIS is uninstalled.

Joomla works fine apart from the mail issue. Set the mail function to mailPHP and I get the dreaded "Could not instantiate mail function" error essage. When I set it to SMTP and enter my email hosts details it works when entering a new user from the backend, but fails on the contacts form with the "PHPMAILER_RECIPIENTS_FAILED" error.


Any ideas chaps what may be the cure for this horrid issue. It would appear that the contacts form is trying to use the mailPHP function by default even though it's been changed in the Global configurations page.... Anyway of changing this to the SMTP method?

User avatar
holdenburg
Joomla! Apprentice
Joomla! Apprentice
Posts: 48
Joined: Sat Dec 10, 2005 11:56 pm
Location: West Palm Beach, Florida
Contact:

Re: Could not instantiate mail function

Post by holdenburg » Fri Jul 09, 2010 4:17 am

UPDATE

I wanted to let everyone know I was finally able to setup and get the the smtp function working...

After further investigation I can tell everyone that if you have users in your DB and their email addresses are bad you have to single out these users and either correct their addresses or remove them. It is a show stopper using SMTP. I don't understand why but if you use Mass Mail and SMTP function you have to have all good email addresses.

Also, it appears that by importing a user DB table this can cause some issues. There was an Admin email address that SMTP started also failing on after I corrected the bad user email addresses and I resetup this email address in C-Panel and the SMTP function started working.

There was mention of this in earlier threads but it is difficult to define. Once you realize this and add the user hopefully this will get the smtp mail engine going again. It sounds simple about adding the same users in C-panel but in this case SMTP was looking for an address that did not exist. I am thinking it may have had something to do with importing tables from my previous DB? I don't know how else to explain this on new clean installs. I did import content and user DB so I still don't know how this address suddenly was a requirement. It was an older admin email address I used to use yet when looking at the addresses in the user db I did not grasp this issue.

Good luck...

H.

joom newbie
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Feb 03, 2011 12:29 pm

Re: Could not instantiate mail function

Post by joom newbie » Thu Feb 03, 2011 1:25 pm

Hi everyone... im desperately in need of some help! :(

I have created a Joomla website and using a wampserver so it is hosted locally. However, I do intend in changing over to a hosting provider..but just taking one technical challenge at a time!! :'(

Ok so I have spent literally WEEKS trying find out how to configure the mail settings correctly, to no avail.

If I change to Mailer: PHP I get the following error:
Could not instantiate mail function
Could not instantiate mail function

IF i Change to Mailer: Sendmail I get this error:
PHPMAILER_EXECUTE/usr/sbin/sendmail

and if I Change to Mailer: SMTP Server, I get the following error:
SMTP Error! Could not connect to SMTP host.
SMTP Error! Could not connect to SMTP host.

At the end of each of these errors, the following message is also displayed:
Message
Your account has been created and an activation link has been sent to the e-mail address you entered. Note that you must activate the account by clicking on the activation link when you get the e-mail before you can login.

I havent a clue what to do.. But im so frustrated that Im tempted to just scrap joomla...even though I have actually put months of work into it!!

I dont have a great understanding of joomla in general, but I have read forums and websites till im blue in the face!

PLEASE Someone help me!!!! I will be eternally grateful (yes that much!)

Kalaiyappan
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Jun 03, 2011 2:34 am

Re: Could not instantiate mail function

Post by Kalaiyappan » Tue Jun 28, 2011 6:16 am

Hi,
Initially i had a problem of PHPMAILER_EXECUTE usr/sbin/sendmail on using PHP MAIL FUnction, i then solved it by changing it to SMTP SERVER.I came to know this seeing this forum,so thanks to all who helped me in knowing this info.

NOW I am trying to send mails from mass mail,as well as lyftenbloggie component to users.When i click send I am getting a notification that mails are sent in both lyftenbloggie and mass mail but, surprisingly i have not received any mails in the inbox.Please help.My server settings were

MailFunction: SMTP Server
Sendmailpath: /usr/sbin/sendmail
SMTP port: 25
SMTP username and Password is empty
SMTP host: localhost.

I thought that username and password and HOST would be required and i gave those attributes after which i get these error messages in global configuration

JFTP::login: Unable to login
JClientHelper::setCredentialsFromRequest failed


could anyone please help me in this so that i can send mails from the site and eliminate the error messages??? :(

I find that conversations held here are very old,i do have a belief that someone will reply to my new post as i am newbee in joomla.Kindly help. ??? ???


Locked

Return to “Administration 1.5”