本文整理汇总了PHP中cEmail::Send方法的典型用法代码示例。如果您正苦于以下问题:PHP cEmail::Send方法的具体用法?PHP cEmail::Send怎么用?PHP cEmail::Send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cEmail
的用法示例。
在下文中一共展示了cEmail::Send方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ew_SendTemplateEmail
function ew_SendTemplateEmail($sTemplate, $sSender, $sRecipient, $sCcEmail, $sBccEmail, $sSubject, $arContent)
{
if ($sSender != "" && $sRecipient != "") {
$Email = new cEmail();
$Email->Load($sTemplate);
$Email->ReplaceSender($sSender);
// Replace Sender
$Email->ReplaceRecipient($sRecipient);
// Replace Recipient
if ($sCcEmail != "") {
$Email->AddCc($sCcEmail);
}
// Add Cc
if ($sBccEmail != "") {
$Email->AddBcc($sBccEmail);
}
// Add Bcc
if ($sSubject != "") {
$Email->ReplaceSubject($sSubject);
}
// Replace subject
if (is_array($arContent)) {
foreach ($arContent as $key => $value) {
$Email->ReplaceContent($key, $value);
}
}
return $Email->Send();
}
return FALSE;
}
示例2: ew_SendNotifyEmail
function ew_SendNotifyEmail($sFn, $sSubject, $sTable, $sKey, $sAction)
{
// Send Email
if (EW_SENDER_EMAIL != "" && EW_RECIPIENT_EMAIL != "") {
$Email = new cEmail();
$Email->Load($sFn);
$Email->ReplaceSender(EW_SENDER_EMAIL);
// Replace Sender
$Email->ReplaceRecipient(EW_RECIPIENT_EMAIL);
// Replace Recipient
$Email->ReplaceSubject($sSubject);
// Replace Subject
$Email->ReplaceContent("<!--table-->", $sTable);
$Email->ReplaceContent("<!--key-->", $sKey);
$Email->ReplaceContent("<!--action-->", $sAction);
$Email->Send();
}
}