If this is your first visit, check our documentation. To post, register or login.
Forums / Installing on a Linux/Unix Server / Email Error: Could not instantiate mail function.

Email Error: Could not instantiate mail function.

Started by godin5150 on 12 Nov 2011, 1:10 PM · Views: 4,311

Results 1 to 2 of 2
12 Nov 2011, 1:10 PM
#1
godin5150 avatar

godin5150

New Zenner

Join Date:
Apr 2006
Location:
Texas
Posts:
37
Plugin Contributions:
0

Email Error: Could not instantiate mail function.

I just moved my site from a vps to dedicated server and everything is working fine except for the emails.
I have it set to use php mail right now and the contact form works, but when I try to update an orders status to delivered I get an email error saying
Email Error: Could not instantiate mail function. Please check Admin->Configuration->Email Options->Email Transport.
Plus with it set to php mail as it is now I do not receive any of the order confirmation emails.

When I change to sendmail then the contact form doesn't work, it gives a sendmail error.

I contacted my host provider and they say its a script issue or a setting that needs to be made on the server. Does anyone know what settings I might need on my dedicated server?

Thanks
Chad

12 Nov 2011, 8:53 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Email Error: Could not instantiate mail function.

When set to 'php" as the transport, Zen Cart simply sends the email using the mail() function in PHP, which relies entirely on the server's php.ini configuration for how to get the email sent.
And many times that's simply set up to use "sendmail", so telling ZC to use "sendmail" is basically the same thing in a lot of cases.
And, if using either of those is giving you errors, that's further confirmation that the server is poorly configured for email. And, since your host is passing the buck then you best simply bypass the server's poor configuration by using SMTPAUTH:

More effective would be using SMTPAUTH and specifying the mailbox SMTP credentials so that the email can actually be sent by having ZC log in a real mailbox and do the send. This also makes the email more legitimate and authentic looking, since it comes from a real mailbox, not a generic poorly-configured server (as the php mode is). As such using SMTPAUTH is the smartest mode to use; and also the best way to get your emails to not be mistakenly treated as spam.

http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Email_Problems
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Understanding_Causes_Of_Lost_Emails

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.