成人精品一区二区三区中文字幕-成人精品一区二区三区-成人精品一级毛片-成人精品亚洲-日本在线视频一区二区-日本在线视频免费

導航首頁 ? 技術教程 ? PHP:mb_send_mail()的用法_mbstring函數
全站頭部文字 我要出現在這里
PHP:mb_send_mail()的用法_mbstring函數 754 2023-12-11   

mb_send_mail

(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:

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 2822.

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() - 設置/獲取當前的語言


主站蜘蛛池模板: 水浒传潘巧云| 最佳男朋友| 印章抠图| 白璐个人简介照片| 急售二室一厅16万元一层楼| 陈宝莲拍过的电影| 红装电影在线观看免费版电视剧全集| 年轻的丈夫| 电影《一秒钟》完整版| 邓为个人简历| 金珠玛米赞二胡曲简谱| 女干.com| 同性gay| 抖音下载安装| 房东小姐| 5一6岁脑筋急转弯大全及答案| 美女撒尿视频| dy| 杨佑宁个人简历| 姐夫操小姨子| 亚洲春黄| 改善运气的微信头像| 少妇av网站| 20岁电影免费完整观看| 成人免费视频在线播放| 陈爱玲| 大胆写真| 爱情买卖网站 电影| 电影 英雄| 李美琪主演的电影| 康瑞德家的男孩| 我没谈完的那场恋爱| 追捕演员表名单| 水蜜桃蜜桃在线观看| 境界千年血战篇| 坏老师| 床上黄色片| 范冰冰性感| 暗恋桃花源剧本| 男女拔萝卜免费视频| 经伟|

!!!站長長期在線接!!!

網站、小程序:定制開發/二次開發/仿制開發等

各種疑難雜癥解決/定制接口/定制采集等

站長微信:lxwl520520

站長QQ:1737366103