当前位置: 首页>>代码示例>>PHP>>正文


PHP cEmail::AddBcc方法代码示例

本文整理汇总了PHP中cEmail::AddBcc方法的典型用法代码示例。如果您正苦于以下问题:PHP cEmail::AddBcc方法的具体用法?PHP cEmail::AddBcc怎么用?PHP cEmail::AddBcc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cEmail的用法示例。


在下文中一共展示了cEmail::AddBcc方法的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;
}
开发者ID:Razinsky,项目名称:echaude-com,代码行数:30,代码来源:phpfn8.php

示例2: cBreadcrumb


//.........这里部分代码省略.........
         // Set activate failed message
         $this->Page_Terminate("cciaglogin.php");
         // Go to login page
     }
     switch ($this->CurrentAction) {
         case "I":
             // Blank record, no action required
             break;
         case "A":
             // Add
             // Check for duplicate User ID
             $sFilter = str_replace("%u", ew_AdjustSql($this->usuario->CurrentValue), EW_USER_NAME_FILTER);
             // Set up filter (SQL WHERE clause) and get return SQL
             // SQL constructor in usuario class, usuarioinfo.php
             $this->CurrentFilter = $sFilter;
             $sUserSql = $this->SQL();
             if ($rs = $conn->Execute($sUserSql)) {
                 if (!$rs->EOF) {
                     $bUserExists = TRUE;
                     $this->RestoreFormValues();
                     // Restore form values
                     $this->setFailureMessage($Language->Phrase("UserExists"));
                     // Set user exist message
                 }
                 $rs->Close();
             }
             if (!$bUserExists) {
                 $this->SendEmail = TRUE;
                 // Send email on add success
                 if ($this->AddRow()) {
                     // Add record
                     // Load user email
                     $sReceiverEmail = $this->_email->CurrentValue;
                     if ($sReceiverEmail == "") {
                         // Send to recipient directly
                         $sReceiverEmail = EW_RECIPIENT_EMAIL;
                         $sBccEmail = "";
                     } else {
                         // Bcc recipient
                         $sBccEmail = EW_RECIPIENT_EMAIL;
                     }
                     // Set up email content
                     if ($sReceiverEmail != "") {
                         $Email = new cEmail();
                         $Email->Load("phptxt/cciagregister.txt");
                         $Email->ReplaceSender(EW_SENDER_EMAIL);
                         // Replace Sender
                         $Email->ReplaceRecipient($sReceiverEmail);
                         // Replace Recipient
                         if ($sBccEmail != "") {
                             $Email->AddBcc($sBccEmail);
                         }
                         // Add Bcc
                         $Email->ReplaceContent('<!--FieldCaption_email-->', $this->_email->FldCaption());
                         $Email->ReplaceContent('<!--email-->', strval($this->_email->FormValue));
                         $sActivateLink = ew_FullUrl() . "?action=confirm";
                         $sActivateLink .= "&email=" . $this->_email->CurrentValue;
                         $sToken = ew_Encrypt($this->_email->CurrentValue) . "," . ew_Encrypt($this->usuario->CurrentValue) . "," . ew_Encrypt($this->contrasenia->FormValue);
                         $sActivateLink .= "&token=" . $sToken;
                         $Email->ReplaceContent("<!--ActivateLink-->", $sActivateLink);
                         $Email->Charset = EW_EMAIL_CHARSET;
                         // Get new recordset
                         $this->CurrentFilter = $this->KeyFilter();
                         $sSql = $this->SQL();
                         $rsnew = $conn->Execute($sSql);
                         $Args = array();
                         $Args["rs"] = $rsnew->fields;
                         $bEmailSent = FALSE;
                         if ($this->Email_Sending($Email, $Args)) {
                             $bEmailSent = $Email->Send();
                         }
                         // Send email failed
                         if (!$bEmailSent) {
                             $this->setFailureMessage($Email->SendErrDescription);
                         }
                     }
                     if ($this->getSuccessMessage() == "") {
                         $this->setSuccessMessage($Language->Phrase("RegisterSuccessActivate"));
                     }
                     // Activate success
                     $this->Page_Terminate("cciaglogin.php");
                     // Return
                 } else {
                     $this->RestoreFormValues();
                     // Restore form values
                 }
             }
     }
     // Render row
     if ($this->CurrentAction == "F") {
         // Confirm page
         $this->RowType = EW_ROWTYPE_VIEW;
         // Render view
     } else {
         $this->RowType = EW_ROWTYPE_ADD;
         // Render add
     }
     $this->ResetAttrs();
     $this->RenderRow();
 }
开发者ID:scintes,项目名称:sistemas,代码行数:101,代码来源:cciagregister.php


注:本文中的cEmail::AddBcc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。