Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
mail(): Policy restriction in effect. The fifth parameter is disabled
I get this error when I try to add new users.
Notice “mail(): Policy restriction in effect. The fifth parameter is disabled on this system”
in mysite/textpattern/vendors/Textpattern/Mail/Adapter/Mail.php at line 236.
adminErrorHandler()
textpattern/vendors/Textpattern/Mail/Adapter/Mail.php:236 mail()
textpattern/lib/txplib_misc.php:2785 Textpattern\Mail\Adapter\Mail->send()
textpattern/lib/txplib_admin.php:70 txpMail()
textpattern/include/txp_admin.php:163 send_account_activation()
textpattern/include/txp_admin.php:55 author_save_new()
textpattern/index.php:255 include()
My hosting provider is One.com. When I ask them about this “policy restriction”, they say no such restriction exists, and I should contact the developer of my cms.
This is a new thing, I’ve been using one.com for dozens of clients since 2007, and it’s always been fine.
Has anybody else had this issue?
Offline
Re: mail(): Policy restriction in effect. The fifth parameter is disabled
helsinkifrostbites wrote #316593:
My hosting provider is One.com. When I ask them about this “policy restriction”, they say no such restriction exists, and I should contact the developer of my cms.
This is a new thing, I’ve been using one.com for dozens of clients since 2007, and it’s always been fine.
Has anybody else had this issue?
Many people on one.com
seem to have this problem. Why has it appeared all of a sudden? PHP version upgrade, SMTP envelope sender address
preference set, open_basedir
switched on, -f
flag lacking a space after it in txp Mail.php
file? If you can check some of these, please share.
Offline
Re: mail(): Policy restriction in effect. The fifth parameter is disabled
They did recently upgrade to PHP 7.2, and it’s after that that this started.
I tried setting the SMTP envelope sender address, it didn’t make any difference.
where can I see if open_basedir is on or off?
Mail.php has this on line 234:
$additional_headers = ($this->smtpFrom ? '-f'.$this->smtpFrom : null);
Doesn’t look like there’s a space there, where is it supposed to go? After the -f
but inside or outside the single quotes?
Offline
Re: mail(): Policy restriction in effect. The fifth parameter is disabled
The users do get added to the txp_users
table, and I can change their password via phpMyAdmin, but that’s not going to be great when my client wants to add new users themselves…
Offline
Re: mail(): Policy restriction in effect. The fifth parameter is disabled
Try to replace '-f'
with '-f '
, though I’m purely googling here. And since it’s just a notice, you can try to prepend mail(...)
with @ to disable the warning. Or simply remove its fifth , $additional_headers
argument.
Thanks for testing :-)
Offline
Re: mail(): Policy restriction in effect. The fifth parameter is disabled
Putting a space in '-f '
didn’t have any effect.
Removing the , $additional_headers
argument did something, because the original error message and all the adminErrorHandler()
stuff doesn’t show up anymore. But I still get Could not send email only now with no explanation.
Offline
Re: mail(): Policy restriction in effect. The fifth parameter is disabled
And yes, one.com says:
One.com’s servers run with safe mode set to off and with open basedir set to on.
Offline
Re: mail(): Policy restriction in effect. The fifth parameter is disabled
No clue, maybe this:
Note that the “To” or “From” address must be an active email account on your domain with One.com.
Offline