位置: 编程技术 - 正文

PHP:mb_send_mail()的用法_mbstring函数

编辑:rootadmin
mb_send_mail

推荐整理分享PHP:mb_send_mail()的用法_mbstring函数,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4 >= 4.0.6, PHP 5)

mb_send_mail — 发送编码过的邮件

说明 bool mb_send_mail ( string $to , string $subject , string $message [, string $additional_headers = NULL [, string $additional_parameter = NULL ]] )

发送邮件。邮件头和内容根据 mb_language() 设置来转换编码。 这是 mail() 的一个包装器函数,所以详情参见 mail()。

参数

to

被发送到该邮件地址。可通过逗号分隔地址的 to 来指定多个收件人。 该参数不会被自动编码。

subject

邮件标题。

message

邮件消息。

additional_headers(可选)

String to be inserted at the end of the email header.

This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (rn). Validate parameter not to be injected unwanted headers by attackers.

Note: PHP:mb_send_mail()的用法_mbstring函数

When sending mail, the mail must contain a From header. This can be set with the additional_headers parameter, or a default can be set in php.ini.

Failing to do this will result in an error message similar to Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing. The From header sets also Return-Path under Windows.

Note:

If messages are not received, try using a LF (n) only. Some Unix mail transfer agents (most notably »qmail) replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with »RFC .

additional_parameter

additional_parameter 是一个 MTA 命令行参数。 在使用 sendmail 时对设置正确的返回路径头很有帮助。

This parameter is escaped by escapeshellcmd() internally to prevent command execution. escapeshellcmd() prevents command execution, but allows to add addtional parameters. For security reason, this parameter should be validated.

Since escapeshellcmd() is applied automatically, some characters that are allowed as email addresses by internet RFCs cannot be used. Programs that are required to use these characters mail() cannot be used.

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.

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE。

更新日志

版本 说明 5.0.0 自 PHP 5.0.0 起可以重新定义 Content-Type 和 Content-Transfer-Encoding 头。 在此之前,总是使用 mb_language() 定义的值。

参见

mail() - 发送邮件 mb_encode_mimeheader() - 为 MIME 头编码字符串 mb_language() - 设置/获取当前的语言

PHP:mb_strcut()的用法_mbstring函数 mb_strcut(PHP4=4.0.6,PHP5)mb_strcut获取字符的一部分说明stringmb_strcut(string$str,int$start[,int$length=NULL[,string$encoding=mb_internal_encoding()]])mb_strcut()和mb_substr()类似,都

PHP:mb_preferred_mime_name()的用法_mbstring函数 mb_preferred_mime_name(PHP4=4.0.6,PHP5)mb_preferred_mime_name获取MIME字符串说明stringmb_preferred_mime_name(string$encoding)获取指定编码的MIME字符string。参数encoding要检查的字

PHP:mb_output_handler()的用法_mbstring函数 mb_output_handler(PHP4=4.0.6,PHP5)mb_output_handler在输出缓冲中转换字符编码的回调函数说明stringmb_output_handler(string$contents,int$status)mb_output_handler()是一个ob_start()回

标签: PHP:mb_send_mail()的用法_mbstring函数

本文链接地址:https://www.jiuchutong.com/biancheng/278608.html 转载请保留说明!

上一篇:PHP:mb_split()的用法_mbstring函数(php-ml)

下一篇:PHP:mb_strcut()的用法_mbstring函数(php中strcmp)

  • 本期实际抵减税额合计0.00不等于
  • 递延所得税费用在资产负债表哪一项
  • 外购商品结转成本分录
  • 个体户查账征收需要交什么税
  • 出口货物的报关时限为装货的24小时以前
  • 长期待摊一般摊几年
  • 外币账户月末怎么结汇
  • 负数发票要给购票人吗
  • 自然人税收系统生产经营怎么申报
  • 跨月红冲发票如何申报退税
  • 税控盘专票认证登录密码正确还是登录不上去
  • 卷烟消费税纳税环节有几个
  • 房地产增值税怎么算举例说明
  • 个税专项附加扣除是每个月扣还是按年计算
  • 出售商品取得的收入300万元存入银行
  • 其他综合收益损失
  • 电子发票和增值税电子普通发票的区别
  • 员工外出培训报告怎么写
  • 外聘人员差旅费应放什么会计科目
  • 发行股票所支付的手续费计入
  • 利润表中企业所得税
  • 工程结算与工程施工
  • 城建税及教育费附加计提表
  • 小微企业的特点及经营模式举例
  • 所得税的税率有哪几种
  • 计提坏账的应收账款收回
  • 会计凭证丢失补违规么
  • 多系统设置
  • win10远程连接提示身份验证错误
  • Win10 20H1/20H2 KB5001391补丁今日发布(内附下载)
  • win7电脑软键盘怎么打开
  • sfx.exe
  • 知乎百万大v
  • PHP:getimagesizefromstring()的用法_GD库图像处理函数
  • 企业购厂房会计分录
  • php写一个函数,算出两个文件的相对路径
  • 限售股转让个人所得税退税
  • js鼠标事件包括哪几种
  • 小规模纳税人季度不超30万免增值税
  • 数据挖掘期末考试大纲
  • 成本降低率是什么意思
  • tsop封装
  • 红字信息表重复了怎么办
  • 物料最低库存
  • 职工探亲如何报差旅费
  • 劳务派遣服务是收派服务吗
  • 非同一控制下的长期股权投资入账价值
  • 物业管理费专票税率是多少
  • 烟叶税计算时价格怎么算
  • 小规模纳税人申报纳税详细流程
  • 企业所得税税前扣除项目有哪些
  • 发表文章开什么发票
  • 支付的中介费进什么科目
  • 软件续费应记什么科目
  • 公司账户的钱怎么合理的转出来
  • 清理固定资产是什么意思
  • 固定资产不能使用了怎么处理
  • 买断式转贴现业务目的一般为
  • 辅助生产成本如何结转
  • 行政单位经费支出审批权限
  • 安装sql server 2008硬件要求
  • macbookairfacetime
  • linux的sh
  • 红石使用基础教学
  • Linux的bg和fg命令简单介绍
  • win7电脑显示器颜色不正常怎么办
  • win8谷歌浏览器出现无法访问此网站
  • jquery文本框内容改变事件
  • python scrapy爬虫
  • vim如何在文件中添加
  • 微信小程序基于spingboot
  • pycharm怎么学
  • 基于jquery的框架有哪些
  • unity的ugui
  • jquery 设置checked
  • python井字游戏
  • springmvc接收json需要配
  • 社保逾期未申报会造成什么影响,要怎么处理
  • 亿企代账怎么增加辅助科目
  • 企业完税证明怎么查询真伪
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设