VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: pm4698 on April 21, 2017, 20:15:20 PM

Title: Could not instantiate mail function.
Post by: pm4698 on April 21, 2017, 20:15:20 PM
Hello there,

Joomla 3.6.4
Virtuemart 3.0.18.5

When i finish an order i get a Could not instantiate mail function. message and no e-mail is being sent.

In global congifuration with phpmailer selected if i click on sent test email, email is sent just fine!

In global configuration i have tried changing phpmailer to sendmail and i get this message:
Could not execute: /usr/sbin/sendmail

When change to  SMTP with company mails (HOST: localhost, Port: 25, Security: NONE, authentication: Yes and credentials of email) and try to test through Global configuration i get this:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Any ideas?

Shouldn't be the phpmailer working just fine?
Title: Re: Could not instantiate mail function.
Post by: GJC Web Design on April 21, 2017, 23:04:30 PM
QuoteJoomla 3.6.4
:o

https://developer.joomla.org/security-centre.html

have u a 3rd party email sender or something as "Could not instantiate mail function." sounds like ages ago with the changes in the Joomla mailer
but that was many versions ago

try to trace further were this error is thrown .. full debug and error reporting etc

try VM3.2.0 perhaps (on a clone first)
Title: Re: Could not instantiate mail function.
Post by: pm4698 on April 22, 2017, 02:00:05 AM
i upgraded to joomla 3.6.5 and vm 3.0.18.19 and still the same issue. I had VMEE installed but i completely removed it and installled again vm as refered previously but still the same
Title: Re: Could not instantiate mail function.
Post by: pm4698 on April 22, 2017, 07:12:35 AM
also i noticed that is not VM issue but joomla. if i use other stuff to send mail trhough joomla i get same message
Title: Re: Could not instantiate mail function.
Post by: jenkinhill on April 22, 2017, 12:20:04 PM
I assume this is on a real live server and not a local wamp/xampp installation without a mailer installed?  It's usually a simple configuration issue.
https://phpmatters.com/how-to-fix-joomla-could-not-instantiate-mail-function-error/
https://besthostingforjoomla.com/how-to-fix-joomla-error-could-not-instantiate-mail-function/
Title: Re: Could not instantiate mail function.
Post by: pm4698 on April 22, 2017, 15:08:14 PM
if i go to Global configuration then either i use php mailer, or sendmail or SMTP when i insert settings and click send test e-mail i receive the e-mail just fine.

But in front-end i cannot send e-mails at all. All the time (either  i use RS!Form forms or another contact module or even after virtuemart order completion) i see the message:
Could not instantiate mail function.

If i had wrong settings i suppose i couldn't send test mails also, correct?

Also i contacted with my hosting provider they checked file permissions -> just fine and they told me that they support php mailer
Title: Re: Could not instantiate mail function.
Post by: jenkinhill on April 23, 2017, 14:51:28 PM
Best to ask on the Joomla forums, as it is a general J! problem, not VM.