位置: 编程技术 - 正文

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)

  • 临时工工资列支工资吗
  • 增值税本期应补退税额为负数怎么处理
  • 未投入使用的道路
  • 周转材料核算科目是什么
  • 小规模纳税人红字发票申报的时候怎么填
  • 企业留存收益包括盈余公积和未分配利润
  • 租金收入增值税纳税义务
  • 购买固定资产增值税可以抵扣
  • 新租赁准则承租人进项税
  • 清算时土地增值税计税依据
  • 注册资本 变更
  • 坏账准备金最新计算公式
  • 所得税费用属于损失吗
  • 交通费进项税抵扣计算
  • 预收账款税收政策
  • 外卖收入增值税怎么算
  • 无偿取得股权账务处理
  • linux ctrl c和ctrl z
  • 促销费影响主营利润吗
  • php使用while循环计算1到100的和
  • 关于汇算清缴的问题
  • 偷渡者视频
  • 实收资本可以大于注册资本嘛
  • PHP:curl_multi_strerror()的用法_cURL函数
  • 应付票据抵付应付账款
  • 今天端午节?
  • 会计分录的表现形式有
  • sonar-scanner需要配置环境变量
  • 工资属于收益类科目吗
  • 会计财务报表的编制步骤
  • 长期待摊费用应该怎么摊销
  • 发放工资时扣除的保险怎么做
  • 应付职工薪酬是负数是什么意思
  • php遍历目录
  • 前端将base64图片转换成file文件
  • vue项目安装路由
  • 成本核算流程及注意事项
  • 货物及劳务包括哪些内容
  • php考试时间倒计时
  • 折扣销售增值税计算例题
  • 固定资产一次性扣除如何做账
  • 应付职工薪酬属于什么会计科目
  • 生产车间领用材料的会计分录
  • 研发费用没有发票怎么做账
  • element remove
  • 印花税申报的流程有哪些
  • 酌量性固定成本是指
  • 固定补贴是否属于社保
  • 小规模公司注销时账务要如何处理
  • 贷款用途不符合规定有啥危害
  • 运动会活动奖品
  • 外派国外的员工享受国内法定假期吗
  • 行政转工会经费请示
  • 固定资产为什么不能直接计入费用
  • 社保费申报是当月的
  • 股东借款转实收资本
  • 工程预交税金是什么意思
  • 在sql server中触发器不具有什么类型
  • sql简单教程
  • win10系统查看
  • XP系统怎么设置双屏幕
  • 不小心修改了注册表怎么还原
  • 硬盘安装好了显示不出来怎么办
  • linux中安装telnet
  • 微软商城会员
  • jQuery Validate 数组 全部验证问题
  • 安卓好用的倒计时
  • 下载随手调
  • cmd打开telnet
  • html头像代码
  • js跳出if语句
  • jquery form序列化
  • Python实现定时任务
  • javaweb开发技术有哪些
  • jQuery EasyUI tree 使用拖拽时遇到的错误小结
  • unity shader saturate
  • javascript函数的定义
  • js鼠标滚动控制图片缩放
  • 个人所得税完税证明网上打印
  • 税控盘离线开票金额为零怎么办
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设