获取phpmailer发送的信息
描述
Correct From: host on outgoing email to match the site domain. It is just a wrapper function for:
1 |
/* ———————————- $phpmailer->Hostname = $current_site->domain; |
用法
<?php fix_phpmailer_messageid( $phpmailer ) ?>
参数
$phpmailer
(PHPMailer object) (必填) outgoing email transport object
默认值: None
示例
1 |
/* ———————————- fix_phpmailer_messageid( $phpmailer ); echo $phpmailer->Hostname; |
注意
使用到 global $current_site.
历史
添加于 版本: MU (WordPress 3.0.0)
源文件
fix_phpmailer_messageid() 函数的代码位于 wp-includes/ms-functions.php
1 |
/* ———————————- function fix_phpmailer_messageid( $phpmailer ) { $phpmailer->Hostname = get_current_site()->domain; } |
相关
wp-includes/class-phpmailer.php
– the PHPMailer class file within WordPress core.
原文:http://codex.wordpress.org/Function_Reference/fix_phpmailer_messageid