Page 2 of 3

Re: Could not instantiate mail function error (different from ot

Posted: Tue Mar 10, 2009 6:37 pm
by bleu
i used this way and it works to my site:

Goto Admin panel > Global Configuration > Server > Mail Settings > Mailer and select SENDMAIL there,instead of PHP MAIL FUNCTION

Re: Could not instantiate mail function error (different from ot

Posted: Tue Mar 24, 2009 8:22 pm
by abusa1
Here is how to change from PHP Mail Function to Sendmail:

1. Log in as an admin on the backend of your joomla (http://localhost/"name_of_your_site"/administrator)
2. On the menu bar (on top) go to Site > Global Configuration
3. You'll see on left side three links "Site | System | Server" (Right under "Global Configuration" phrase)
4. Click on the Server
5. Then find on your right "Mail Settings" box
6. In the Mailer drop down menu change from PHP Mail Function to Sendmail

Hope this helps

Re: Could not instantiate mail function error (different from ot

Posted: Thu Jul 16, 2009 1:10 am
by slavster
Thank you, temporaryadd08. It works, but..
it doesn't send a confirmation letter, and goes to the blank page index.php/component/user/

When I go to the User Manager - I see a new user, approve the user , everything is fine, now user can enter the website.

,localhost.

Re: Could not instantiate mail function error (different from ot

Posted: Fri Aug 07, 2009 5:25 pm
by thesheriff
I tried writing a normal mail() script on my server. It works. So no host issues. But whenver I use the php mail func in joomla. It gives me a could not instantiate error.

Re: Could not instantiate mail function error (different from ot

Posted: Tue Oct 06, 2009 7:54 am
by VooDooDoll
I tried everything I was reading on this forum and finally fixed it through trial error. I finally fixed it by googling aol smtp because I had an aol address. The directions were right there very similar to how you would set up the configurations for outlook express.

i followed the configurations they gave me....aol likes to use port 587 not 25...They like "user authentication" also.

Once my smtp global configurations were set...I opened up

Joomlafolder\libraries\phpmailer\smtp.php scrolled down and changed the port to match...it worked like a charm...my advice is....go to Ur email provider and find out what ports they prefer you to use then change your site\global configurations\server\mail settings to smtp and fill in the blanks as they suggest..then change your smtp.php file and you might be happy from the results...

cuz who hates wasting time!!!

Global configurations for AOL:
* Set (SMTP) mail server Host to smtp.aol.com.
* Make sure SMTP authentication is enabled for this server.
* Enter your screenname as the user name and
* your AOL screennname's password as the password.
* Make sure the SMTP server port is set to 587.
*SMTP security to 'none'

var $SMTP_PORT = 587; <----(this will be the port setting in your smtp.php file)

Re: Could not instantiate mail function error (different from ot

Posted: Mon Oct 26, 2009 8:38 pm
by Acario
Could not instantiate mail function error
I got this message too. Took a bit to realize I forgot to put in the Administrator email address in the JForms form I made. Works fine now. Thought I'd share this since it's something so simple I'm sure others are looking over it too.

Re: Could not instantiate mail function error (different from ot

Posted: Fri Oct 30, 2009 4:01 am
by decomo95
I got could not instantiate mail error. I followed the instruction above and changed the global config to indicate sendmail instead of phpmail. Now instead of getting the instantiate error, I got this new error:

PHPMAILER_EXECUTE/usr/sbin/sendmail

any idea why?

thanks.

Re: Could not instantiate mail function error (different from ot

Posted: Fri Nov 13, 2009 9:36 am
by mshoaib
Well i am using Linux base hosting, that is running Apache, so what should be my php.ini configuration?

Re: Could not instantiate mail function error (different from ot

Posted: Thu Nov 26, 2009 2:49 pm
by dvdhinton
I had the same problem, I found my solution here http://forums.codewalkers.com/php-codin ... 20775.html
Hope this helps.

Re: Could not instantiate mail function error (different from ot

Posted: Tue Dec 08, 2009 11:02 pm
by Ironside
I had this problem today, for the life of me couldn't find out what was wrong and then found something really simple causing the problem.Basically when I entered the e-mail , somehow some more text was tagged. onto the end in the e-mail field

Re: Could not instantiate mail function error (different from ot

Posted: Sat Dec 19, 2009 2:31 am
by fusioneiko
This worked for me:

Mailer SMTP Server
Mail from [email protected]
From Name Whatever
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Security SSL
SMTP Port 465
SMTP Username [email protected]
SMTP Password mypassword
SMTP Host smtp.gmail.com


Note: i was using the 064_joomla_1.5.x_php5_securemail_patch

Re: Could not instantiate mail function error (different from ot

Posted: Tue Jan 19, 2010 8:35 am
by gsa
The short version: This error may be simply the result of asking Joomla to send an email to a non-existing email address.

The long version:
It appears that there are various situations that cause the "Could not instantiate mail function" error. I am sure some of them call for the extreme measures suggested in this thread and other threads on the same problem, but I also suspect that many can be resolved much more easily...

Before leaping into the dangerous waters of making spaghetti out of the Joomla code, I recommend to those experiencing this problem to start by making absolutely sure that all email addresses which will need to be used (e.g., the recipient of a contact form) are correct AND valid AND exist.

Let's say that your install is at www.some-crazy-site.com and you want your visitors to be able to email to Mr. Zebra who is a member of your team and whose email address is [email protected]. Naturally, you will set up a Joomla contact for Mr. Zebra with the email address [email protected] (you don't even need for Mr. Zebra to be a user). But this is NOT ENOUGH. The email address [email protected] MUST EXIST as a valid and working email address. If you are hosted somewhere, go to the cPanel and set it up as an email account for [email protected].

Bottom line:
1. Make sure that the link/menu-item to the contact form (or equivalent functionality) is current and connected to a real and live contact (not an old leftover from some migrated/replicated installation).
2. Make sure that the contact's email address exists, is valid and is correct.

Re: Could not instantiate mail function error (different from ot

Posted: Wed Feb 03, 2010 5:12 pm
by hylndr11
Interesting, I am experiencing the same thing over another issue though, I transferred my site to another domain and hosting account. Setup webmail on cpanel and all settings seem to be right but when i try to send out email with mass mail it gives me this error, host said everything is correct...i dont know,

Re: Could not instantiate mail function error (different fro

Posted: Tue May 25, 2010 10:51 pm
by Lamer4o
So this is and old topic,but let's bring it back to life ... i saw some dude's say they can use this Securemail Patch ... but first for 1.5.8 and second the link for download is old and don't work so here is my question :
Can some one please get mi a Link for download (but working) but for 1.5.15 Version of Joomla, becoas i get first this error :
* Could not instantiate mail function.
* Could not instantiate mail function.
* 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.

and then after few adjustment i get this error :


* SMTP Error! Could not connect to SMTP host.
* SMTP Error! Could not connect to SMTP host.

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.

So my only change is this Secure Mail (FOR 1.5.15 Version of Joomla) Works (I have a Gmail account [ free ] ) so please help out!

Re: Could not instantiate mail function error (different fro

Posted: Sun Jun 06, 2010 8:04 pm
by mathewsmail13
Guys, every time i tried to add the contact email to joomla, i had the problems with settings and i had to play around for a long time. but i have solved the problem twice.
These may be useful only for websites with godaddy, i dont know if this is gonna work with other hosts. the following are what i have done.
1. make sure the hosting is linux based and not windows.(thats what worked for me)
2. in your hosting account make the desired email account.
3. make sure you have the same email specified in the 'email from' in the email settings of your hosting account.
4.when you add the 'contact' module, make sure you have the same email address you made with your domain.
5. in global configuration the settings should be as follows:

Mailer : PHP mail function
Mail from : [email protected] (eg: [email protected])
From Name : whatever name you want to appear as 'from' when you send an email
Sendmail Path :/usr/sbin/sendmail
SMTP Authentication :Yes
SMTP Security :none
SMTP Port : 25
SMTP Username : username of your email (eg:info)
SMTP Password : your email password
SMTP Host: relay-hosting.secureserver.net (this particular one was different to the previous hosting account. so i recommend trying with the default SMTP host name you get in this field first)

GOOD LUCK GUYS ;)

Re: Could not instantiate mail function error (different fro

Posted: Mon Jun 21, 2010 3:29 am
by ZaqHydN
I used SMTP.

I could NOT get PHPmailer to work, or Sendmail.

Mailer: SMTP
Mail From: [email protected]
From Name: Mr. Your Name
Sendmail path:
Auth: NO
Security: None
Port: 25
UN: [email protected]
PW: ************
Host: mail.website.com

Re: Could not instantiate mail function error (different fro

Posted: Tue Jun 29, 2010 9:15 pm
by gavakie
I am having the same problems, wierd thing is there is another joomla site setup where the mail is working but I cant get it to work on this site.

Re: Could not instantiate mail function error (different fro

Posted: Fri Aug 06, 2010 5:31 am
by kohler
my port 25 is blocked from my isp is there a way around that mailer thing even with port 25 being blocked... i tried the whole smtp.gmail.com and it still isn't working...
Mailer SMTP Server
Mail from [email protected]
From Name domain name
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Security none
SMTP Port 465
SMTP Username [email protected]
SMTP Password my password
SMTP Host smtp.gmail.com

once i sign a new user up, it loads and goes to a white page same as the send mass mail link in the admin cp... this is confusing me...

Re: Could not instantiate mail function error (different fro

Posted: Thu Aug 12, 2010 4:42 am
by kohler
is anyone else watching this thread besides me?

Re: Could not instantiate mail function error (different fro

Posted: Fri Aug 20, 2010 11:10 pm
by zingo-46
I also have the same problem, however, sometimes it works and sometimes not.

I user Userport to register new users and sometimes the notification mail goes out properly but sometimes it doesn't. It can be 2-3 times of failure with the above error and then suddenly it works fine. The user is added properly to the database every time, just the mail that fails every now and then.

I have tried different combinations etc to see if there is a pattern but I haven't found one so far. It may work direct, 2-3 times then it may fail a couple of times then it is ok again.

The fact that it does work at all makes misconfig in the mail-settings less likely, I recon, but what makes it fail every second or 2 out of three times? I keep feeding the same CSV-string over and over again, deleting the user after each failed attempt, until it works.

The idea of using CSV was to make it faster and easier to enter some 400 users but so far it has not been that successful...

Btw, I'm using Joomla 1.5.18, php-mail function and userport 1.7.

Anybody that has some clue?
Rgds
/c

Re: Could not instantiate mail function error (different fro

Posted: Wed Sep 15, 2010 11:56 pm
by funkDoc
Hey all, just seeing the status of this issue. I haven't been able to get joomla configured to work with gmail either. I can send and receive email through clients (thunderbird) on the same machine, using the exact same information I use in joomla. Here's my enviornment:
os:win7
web server: apache 2.2
joomla: 1.5.20

Thanks for any help on this, I'm extremely desperate to get this working. I have been very happy with joomla but need to fix this issue, any tips would be greatly appreciated.

Is email authentication on windows with gmail not supported?

Re: Could not instantiate mail function error (different fro

Posted: Thu Sep 16, 2010 3:29 am
by leolam
kohler wrote:my port 25 is blocked from my isp is there a way around that mailer thing even with port 25 being blocked... i tried the whole smtp.gmail.com and it still isn't working...
Mailer SMTP Server
Mail from [email protected]
From Name domain name
Sendmail Path /usr/sbin/sendmail
SMTP Authentication Yes
SMTP Security none
SMTP Port 465
SMTP Username [email protected]
SMTP Password my password
SMTP Host smtp.gmail.com
Gmail utilizes:
* SMTP-security : TLS
* Port: 587 (Outlook) and 465 in Thunderbird
http://mail.google.com/support/bin/answ ... swer=86374 and choose your email client to configure properly

Leo 8)

Re: Could not instantiate mail function error (different fro

Posted: Mon Oct 18, 2010 7:35 pm
by SuperMole
Acario wrote:
Could not instantiate mail function error
I got this message too. Took a bit to realize I forgot to put in the Administrator email address in the JForms form I made. Works fine now. Thought I'd share this since it's something so simple I'm sure others are looking over it too.
Helped me. Thanks for pointing this out. Maybe in JForms 0.7 they made it stand out more clearly...

Re: Could not instantiate mail function error (different fro

Posted: Thu Jan 06, 2011 2:40 pm
by v_vorn
mathewsmail13 wrote:Guys, every time i tried to add the contact email to joomla, i had the problems with settings and i had to play around for a long time. but i have solved the problem twice.
These may be useful only for websites with godaddy, i dont know if this is gonna work with other hosts. the following are what i have done.
1. make sure the hosting is linux based and not windows.(thats what worked for me)
2. in your hosting account make the desired email account.
3. make sure you have the same email specified in the 'email from' in the email settings of your hosting account.
4.when you add the 'contact' module, make sure you have the same email address you made with your domain.
5. in global configuration the settings should be as follows:

Mailer : PHP mail function
Mail from : [email protected] (eg: [email protected])
From Name : whatever name you want to appear as 'from' when you send an email
Sendmail Path :/usr/sbin/sendmail
SMTP Authentication :Yes
SMTP Security :none
SMTP Port : 25
SMTP Username : username of your email (eg:info)
SMTP Password : your email password
SMTP Host: relay-hosting.secureserver.net (this particular one was different to the previous hosting account. so i recommend trying with the default SMTP host name you get in this field first)

GOOD LUCK GUYS ;)

:) I only can say "THANKS YOU SO MUCH....." :)

It absolutely works !!!!

Re: Could not instantiate mail function error (different fro

Posted: Wed Feb 02, 2011 7:06 am
by wolf4
I did not yet get it to work.
I followed many of your suggestions.

Funny thing is, the system sends a user registration email to me ... that works!
Only the contact form - whatever method I try ... does not response.

My provider support, without giving a direct answer, is telling me:
"One thing I have learned, emails are likely to not deliver if a valid "from" address is not specified in the emailing PHP script."

Which sending script? What could she mean?

Re: Could not instantiate mail function error (different fro

Posted: Fri Apr 08, 2011 3:51 pm
by mikenick
I am using SysSoft Hosting for Joomla 1.5.22
I am attempting to set up the contact form. I am getting the same errors others have had.

If I change the Global Configuration - Mail Settings to PHP Mail Function, then I get a Could Not Instantiate error

If I change the Global Configuration - Mail Settings to Sendmail, then I get a PHPMAILER_EXECUTE/usr/sbin/sendmail error.

If I change the Global Configuration - Mail Settings to PHP Mail Function, then I get a SMTP Error! Could not connect to SMTP host error. I changed the SMTP Port number from 25 to 465, but then the page eventually goes to a blank page and no email was sent.

I don't know much of any PHP and I think if I did I might be able to fix my problem. If I use the PHP Mail Function option, I'm sure there are some files I could add code to to fix the problem, but I do not know the proper code. Any ideas here?

The other problem is that I am trying to test the contact form with my gmail account, but the from email address will eventually be switched over to the [email protected] address. This is a class project for a customer so its been a little tricky trying to test it.

I am frustrated so I am changing bits and pieces constantly now and I might have actually had the right things done, but not in the right combination -- or not!

And ideas?

Re: Could not instantiate mail function error (different fro

Posted: Mon Apr 11, 2011 8:05 pm
by xanterra
Hi there, i have same error since the first day i have installed Joomla on my windows 2008 server.
This error apperas when user registers on front end or when i try to send massmail via admin console.

I have also read all related articles and could not find an answer to resolve this problem and hoping you can help.

Please pay attention to attached image as I have noticed that before I get " Could not instantiate mail function." error in Jomla, i was able to capture the message before joomla returns the error.

Line:228 $error = end($this->_errors); in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\cms\libraries\joomla\error

Enviroment settings:
Windows 2008 server/ Apache 2.2.17 / PHP 5.3.5 / Joomla 1.6 /

mail settings under Global configuration:
Mailer: PHPMail
From email: [email protected]
From name: anyname
Sendmail path: /usr/sbin/sendmail
SMTP authentication: No
SMTP security: None
SMTP username: [email protected]
SMTP password:" blank"
SMTP Host: smtprelay.exchange.com (this relay server is serving other domains in our environment so do not confuse with my domain name and this host name)

Re: Could not instantiate mail function error (different fro

Posted: Tue Apr 19, 2011 2:42 pm
by xanterra
Hi there,

getting no answer to my previous question gave me some time to search bit more in different avenues and finally i was able to figure out the issue.

My investigation has revealed that there was a missing FW rule between server where joomla is hosted and smtp server which is in another network.

However I would like to bring below suggestion to moderators or Joomla developers to create more user friendly error logs as original error message I was getting was misleading.

This topic is posted in many other places and as a new Joomla user, I should be able to see the where error is coming from in Joomla so i can dig myself before asking to forum. As you will see in previous attachment, error messaging was misleading to something in time zone which has nothing to do with missing FW rule.

Why Joomla does not thrown the last php error as soon as I use PHPmailer in the log file which will tell me exact problem.

For the rest of the user, if you have similar issue, please check your PHP error log in below path if you are using windows server and did not change default settings.
C:\Windows\temp\php-errors.log

Cheers,

Failed to send message.: PHPMAILER_CONNECT_HOST

Posted: Mon Oct 31, 2011 6:24 am
by surendrapareek
pls tell me the reason of this error i am using flexi contact modoule for the contact form with local host my site is not hosted now

Re: Could not instantiate mail function error (different fro

Posted: Mon Dec 19, 2011 1:06 am
by stanzahero
I had this issue because Joomla! (Jobline component) was trying to send an email with the 'to address' and the 'from address' the same.
I did a check before sending it:
if ( $email != $cfgjl['mailfromaddress'] ) {
send email here...
}