Skip to content

Instantly share code, notes, and snippets.

@oott123
Last active December 16, 2015 19:50
Show Gist options
  • Save oott123/5488170 to your computer and use it in GitHub Desktop.
Save oott123/5488170 to your computer and use it in GitHub Desktop.
BCMS邮件发送函数简单封装(仅可用于BAE)
<?php
//BCMS发信函数简单封装(BAE Only)
//用法:bcms33_mail(收信人地址(必须为数组),主题,邮件内容,发信人)
//PS.要发送HTML邮件,需在邮件内容前加<!--HTML-->这个标记。
define('BCMS_QN','BCMS队列ID');
function bcms33_mail($reciver,$subject='test',$data='<!--HTML-->Test<br />Test Mail.',$sender='[email protected]'){
require_once 'Bcms.class.php';
$bcms = new Bcms();
$optional = array(
Bcms::MAIL_SUBJECT => $subject,
Bcms::FROM => $sender,
);
$bcms->mail(BCMS_QN,$data,json_encode($reciver),$optional);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment