1 (edited by slieben 2015-09-15 10:45:25)

Topic: CONTACT page : error message [SOLVED]

Hello,

When a user tries to send me a mail, using the contact form, this returns the following error :

mail(): Policy restriction in effect. The fifth parameter is disabled

My webhoster is One.com.

Any idea to solve this ?

Thank you in advance,

Steph

Re: CONTACT page : error message [SOLVED]

The contact form requires full PHP mail support and it sounds like your web host may have disabled some of this functionality.
You could perhaps contact your web host and ask if they would allow full PHP mail support on your hosting account (including the fifth parameter to the function which seems to currently be disabled).

Otherwise, you could try the following (although I do not know if it will work).
(1) Open the 'showkase/admin/plugins/contact/master/contactcore/class.phpmailer.php' file in a plain text editor.
(2) Change line 631 from:

$result = @mail($to, $subject, $body, $header, $params);

... to:

$result = @mail($to, $subject, $body, $header);

This should ensure that the fifth parameter ($params) is not used in the PHP mail function.

Re: CONTACT page : error message [SOLVED]

Thank you for your swift answer Steven.

I contacted my webhoster "one.com" and requested them for full PHP mail support. I wait their answer...

In the meanwhile, I modified 'showkase/admin/plugins/contact/master/contactcore/class.phpmailer.php' as you instructed, then uploaded it to my webserver. But the issue is still present - still got the same error message...

Re: CONTACT page : error message [SOLVED]

OK. I'm sorry to hear that my suggestion did not work.
Please let me know how you get on with your web host. Thank you.

Re: CONTACT page : error message [SOLVED]

Hi Stephen,

For information, here is the answer from 'one.com' (my hoster) :

Hello,   Thank you for contacting One.com!  The fifth parameter is disabled as it is not supported in our servers. It is a limitation in our services. We cannot enable this unfortunately.  You will need to edit your template and comment out or remove the scripts that require to use the fifth parameter. In case this is necessary in the template, then unfortunately, you can't use this in our server. Perhaps, you will need to select another template.  If you have further questions, please do not hesitate to contact us through our 24 / 7 English online chat or email us at sales@one.com / support@one.com.
Best regards  Grace One.com

But the good news is that today, the Contact form now works. So, I guess that the file 'class.phpmailer.php' was cached somewhere, and that it has been refreshed today.

So, I confirm that my problem is solved.

Thank you very much Stephen

Re: CONTACT page : error message [SOLVED]

I'm glad to hear it's now working for you. Thank you for letting me know.
I expected my suggestion would work (but I couldn't test it as I could not replicate your problem) so I expect your most recent problem was, indeed, due to caching.

Thank you very much Stephen

You're welcome.