WordPress BAE上发邮件函数
WordPress在BAE上发邮件的函数功能,直接放入主题functions.php就可以了。代码如下:if ( !function_exists( 'wp_mail' ) ) :function wp_mail( $to, $subjec
WordPress在BAE上发邮件的函数功能,直接放入主题functions.php就可以了。
代码如下:
if ( !function_exists( 'wp_mail' ) ) :
function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() )
{ $queue = '云消息名称';
require_once ('Bcms.class.php');
$bcms = new Bcms () ;
$form = '发件人地址';
$ret = $bcms->mail ( $queue, '' . $message, array( $to ), array( Bcms::FROM=>$from_email, Bcms::MAIL_SUBJECT => $subject) ) ;
if ( false === $ret ) { return false; }
else { return true; } }
endif;
特别声明:以上内容(如有图片或视频亦包括在内)为本平台用户上传并发布,本平台仅提供信息存储服务。举报




