English 中文(简体)
基本邮件功能(PHP)
原标题:Basic mail function (PHP) additional "-f" parameter question

《<代码>-f在本邮件功能中正确列出的附加参数。

@mail("example@exmaple.com.uy",$title,$body,$headers,"-f");

我正在从一些服务器上调取<代码>X 警告。

Sorry for the basic question but some part of the documentation 我感到困惑(特别是一些用户评论)。

提前感谢!

最佳回答

手册:

The additional_parameters parameter can be used to pass additional flags as command line options to the program configured to be used when sending mail, as defined by the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.

The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a X-Warning header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users.

来源:

The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option. You may need to add the user that your web server runs as to your sendmail configuration to prevent a X-Warning header from being added to the message when you set the envelope sender using this method. Example 3. Sending mail with extra headers and setting an additional command line parameter.

i.e:

<?php
mail("nobody@example.com", "the subject", $message,
"From: webmaster@{$_SERVER[ SERVER_NAME ]}", "-fwebmaster@{$_SERVER[ SERVER_NAME ]}");
?>

之后,请您提供即将离任的电子邮件地址,以防止发出警告(在这种情况下,其网络长@-领域-)。

问题回答

如果您的机器运行在1台轴服务器上。 您在用户www-data下安装了比可能多得多的仪器。

您可以很容易地看到这一点,看上去/上/上/跳板2和打字。

cat envvars | grep APACHE_RUN_USER

无论在什么时候?

你们需要把这一用户添加到可信赖的用户档案中。 该档案位于/etc/mail/trusted-user。

正义

nano /etc/mail/trusted-users

www.un.org/Depts/DGACM/index_french.htm

除此以外,你应当善于行。

- 您希望的地址作为邮件的封面地址。

@mail("example@exmaple.com.uy",$title,$body,$headers,"-fexample@exmaple.com.uy");

你们是否试图在没有旗帜下寄来?

The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a X-Warning header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users.

您需要具体说明在国旗之后的电子邮件地址。 与此类似:“fexample@example.com”。 您可能还需要增加用户,即你的网络服务器在发送邮件组合上运行。





相关问题
Angle brackets in php

I want to store angle brackets in a string in PHP because i want to eventually use mail() to send an HTML email out. The following is the code that doesn t seem to work. while(...) { $msg .= "<...

authlogic auto_register feature using my options

I have auto registration working with authlogic using gaizka s version of authlogic_openid which I found on Github since pelle s original addition of the feature seemed to cause issues. http://...

Zend 邮件问题,涉及外国char子+ com子

泽斯德邮局在名称被定为具有外国性质(如“保”)和 com(”)的物品时,就放弃了一种例外(因为邮局(邮局)退回假)。 重新提出以下守则。

How to track an email in Java?

How I can track an email? I m using java on the server side for sending emails. I want to track whether it is delivered , opened, etc... How I can do that ?

Web Link in a mail is not rendering as link in yahoo

string from = "abc@gmail.com"; string to = "xyz@gmail.com,xyz@yahoo.co.in"; string password="abcxyz"; MailMessage mail = new System.Net.Mail.MailMessage(); mail.To.Add(to); mail.From = new ...

SharePoint - Approaching Website Storage Limit Email

How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it s size limit? Thanks for your ...

How to create an email mailing list

Im creating a coming soon page for a website im developing, and im adding an option for the user to enter their email address so we can email them when the site is up. How do I do this?

CCNet email does not include MSBuild results

We re using CCNet 1.4.4.83 but when an MSBuild task fails, we don t get the MSBuild results (i.e. missing file or whatever reason the compile failed) in the email notification. I do see the build ...

热门标签