PHP function mail () 5th argument


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
5 views
Universal post script with PHPMailer when sending letters using mail() as the 5th argument to the function substitutes the string "-oi-f mail@example.com".
Popular framework CodeIgniter does the same thing, only without a flag "-oi".

But valuehost.ru not sending a letter if the 5th parameter is the key "-f".

Do not want (and wrong) to change the framework code. It would be better to make the necessary changes in server configuration, I think. The problem is that I don't know what should be the settings (I hope the admins Valuehost will meet, if I will tell them what and where to fix).

Has anyone faced such a problem? Does anyone know the reasons why mail() might not work with key "-f"?

In advance thanks a lot :)
by | 5 views

6 Answers

0 like 0 dislike
as a former stand hoster familiar with the problem. We have a mailer was exim. The heart of the incident that mail server refuses to set the Sender field to any name, and only then, from whom you start the process (PHP). You can also include the resolution of such substitution, but personally I would bulk server hosting did not. This prohibition helps keep track of spammers and hacked clients. But on the same peg Itseh and often was turned off such a check.
by
0 like 0 dislike
Read here description 5 parameter (additional_parameters).
The essence — the fifth parameter is used to pass additional flags to the program used to send mail. For example, this parameter can be used to set the address of the envelope sender when using sendmail with the-f flag.
There is a separate indication. The user, under which runs the web server must be added to trusted (trusted) to the sendmail configuration to prevent adding the header "X-Warning", when the sender is specified using the-f flag. For sendmail users, this file — /etc/mail/trusted-users.
In the end, for details of the answer to your question is to read the documentation for the program that sends mail on the server.
by
0 like 0 dislike
With PHP 4.2.3, this parameter is forbidden in safe mode and mail() function will issue a warning message and return FALSE if you try to use it.
Maybe this is your case and valuehost.ru using the safe mode
by
0 like 0 dislike
Why not use the sendmail function is the same in CodeIgniter?
\r
$config['protocol'] = 'sendmail'; $config['mailpath'] = '/usr/sbin/sendmail'; $this->email->initialize($config); ... 
by
0 like 0 dislike
you need to wean your CMS to insert the 5th argument.
In the dock codeigniter.com/user_guide/libraries/email.html it is written that there is a possibility in the config config/email.php (there is no default) specify settings for sending mail. Including you can make sending via an SMTP connection instead of the local mail server.
Try to go that route.
by
0 like 0 dislike
Perhaps it is worth considering whether you need General valuehost.ru?
I'm certainly not trying to dissuade, but when I did one proaches in which the customer is attended to by domain and hosting (Yes, valuehost) — opplevelse at work. Starting from the fact that they are not tied to the domain account (how is that even possible?), he then tied it crooked (enter the address of the site and... get on some German Parking-page), ending with endless "Yes, it features our servers configs, no change, no one will, our freeBSD the freeBSD and BSD all free", although on 3 other hosts are all perfectly working and running :(
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
asked May 3, 2019 by danilazharikov
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,920 users