Topic: contact email setting

contact Customize

Optional Contact Form

Email to (



Could not instantiate mail function.

how to email setting

Re: contact email setting

It sounds like a server configuration issue or a PHP mail restriction of some kind.

As I mentioned yesterday in this forum post, I checked exactly this functionality (a regular Contact Form without any modification using a Gmail address) and it worked fine for me (on my own server).

Showkase uses PHPMailer internally to send the Contact Form mail.
Here are PHPMailer's own notes on the "Could not instantiate mail function" message.

This means that your PHP installation is not configured to call the mail() function correctly (e.g. sendmail_path is not set correctly in your php.ini), or you have no local mail server installed and configured. To fix this you need to do one or more of these things:

  • Install a local mail server (e.g. postfix).

  • Ensure that your sendmail_path points at the sendmail binary (usually /usr/sbin/sendmail) in your php.ini. Note that on Ubuntu/Debian you may have multiple .ini files in /etc/php5/mods-available and possibly other locations.

  • Use isSendmail() and set the path to the sendmail binary in PHPMailer ($mail->Sendmail = '/usr/sbin/sendmail';).

  • Use isSMTP() and send directly using SMTP.

Please confirm with your web host that PHP mail functionality is enabled on your hosting account.
Please also check that the sendmail_path is configured correctly in your PHP settings. (Your web host should be able to help you with this.)

There could also be a restriction in place whereby mail is not being sent on your server due to the email address you use not matching the domain of your website. (Your web host should be able to confirm this.)
If this is the case, then please try the following:

(1) Open the 'showkase/admin/plugins/contact/master/contactcore/contact.php' file in a plain text editor.

(2) Change line 91 from:

$mailer->setFrom('mailer'.strstr($siteEmail, '@'), $userName);

... to:

$mailer->setFrom('mailer'.strstr($siteEmail, '@'), $userName, false);

I cannot be sure that this will make a difference but it is certainly a quick and easy thing to try.

Please note that the line number above refers to the current version of Showkase (v1.7.4).