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


PHP EmailTemplate::setSubject方法代码示例

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


在下文中一共展示了EmailTemplate::setSubject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeAjaxSave

 public function executeAjaxSave(sfWebRequest $request)
 {
     $template = trim($request->getParameter('template'));
     if (empty($template)) {
         return $this->renderText('Please specify template name');
     }
     $email_template = new EmailTemplate();
     $email_template->setName($template);
     $email_template->setSubject($request->getParameter('subject'));
     $email_template->setSenderEmail($request->getParameter('email'));
     $email_template->setSenderName($request->getParameter('name'));
     $email_template->setBody($request->getParameter('body'));
     $email_template->setPersonId($this->getUser()->getId());
     $email_template->save();
     return $this->renderText('#New template have successfully saved!');
 }
开发者ID:yasirgit,项目名称:afids,代码行数:16,代码来源:actions.class.php

示例2: EmailTemplate

    /**
     * Internal function to return an email template object from a row.
     * @param $row array
     * @return EmailTemplate
     */
    function &_returnEmailTemplateFromRow(&$row)
    {
        $emailTemplate = new EmailTemplate();
        $emailTemplate->setEmailKey($row['email_key']);
        $emailTemplate->setEnabled($row['enabled']);
        $emailTemplate->setCanDisable($row['can_disable']);
        if (!HookRegistry::call('EmailTemplateDAO::_returnEmailTemplateFromRow', array(&$emailTemplate, &$row))) {
            $result =& $this->retrieve('SELECT d.locale, d.description, d.subject, d.body
				FROM email_templates_data AS d
				WHERE d.email_key = ?', $row['email_key']);
            while (!$result->EOF) {
                $dataRow =& $result->GetRowAssoc(false);
                $emailTemplate->addLocale($dataRow['locale']);
                $emailTemplate->setSubject($dataRow['locale'], $dataRow['subject']);
                $emailTemplate->setBody($dataRow['locale'], $dataRow['body']);
                $emailTemplate->setDescription($dataRow['locale'], $dataRow['description']);
                $result->MoveNext();
            }
            $result->Close();
            unset($result);
        }
        return $emailTemplate;
    }
开发者ID:jalperin,项目名称:harvester,代码行数:28,代码来源:EmailTemplateDAO.inc.php

示例3: EmailTemplate

 /**
  * Internal function to return an email template object from a row.
  * @param $row array
  * @return EmailTemplate
  */
 function &_returnEmailTemplateFromRow(&$row, $isCustomTemplate = null)
 {
     $emailTemplate = new EmailTemplate();
     $emailTemplate->setEmailId($row['email_id']);
     $emailTemplate->setAssocType($row['assoc_type']);
     $emailTemplate->setAssocId($row['assoc_id']);
     $emailTemplate->setEmailKey($row['email_key']);
     $emailTemplate->setLocale($row['locale']);
     $emailTemplate->setSubject($row['subject']);
     $emailTemplate->setBody($row['body']);
     $emailTemplate->setEnabled($row['enabled'] == null ? 1 : $row['enabled']);
     $emailTemplate->setCanDisable($row['can_disable']);
     $emailTemplate->setFromRoleId($row['from_role_id']);
     $emailTemplate->setToRoleId($row['to_role_id']);
     if ($isCustomTemplate !== null) {
         $emailTemplate->setCustomTemplate($isCustomTemplate);
     }
     HookRegistry::call('EmailTemplateDAO::_returnEmailTemplateFromRow', array(&$emailTemplate, &$row));
     return $emailTemplate;
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:25,代码来源:PKPEmailTemplateDAO.inc.php

示例4: eventSendNote

 /** 
  *   eventSendNote
  *   This event is triggered when adding a note in a contact 
  *   It will send a copy of the note the contact.
  */
 function eventSendNote(EventControler $event_controler)
 {
     $send_note = $event_controler->fields['send_email'];
     $this->setLog("eventSendNote starting (" . date("Y/m/d H:i:s") . ")");
     $this->setLog("do we send a message:" . $send_note);
     if ($send_note == "y") {
         $template = new EmailTemplate();
         $template->setSubject("{Ofuz} Message: " . substr($event_controler->fields['note'], 0, 70) . "...")->setMessage($event_controler->fields['note']);
         $this->sendMessage($template);
     }
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:16,代码来源:ContactMailing.class.php

示例5: while

    while ($ContactWebsite->next()) {
        $vcard .= "URL;TYPE=" . $ContactWebsite->website_type . ":" . $ContactWebsite->website . "\r\n";
    }
}
$vcard .= "END:VCARD\r\n";
//echo $vcard;
$file_name = $_SESSION['public_profile_name'];
if ($send_email === true) {
    $file_path = 'contact_vcf/' . $file_name . 'vcf';
    $fh = fopen($file_path, 'w') or die("can't open file");
    fwrite($fh, $vcard);
    fclose($fh);
    $do_template = new EmailTemplate();
    $do_template->setSenderName("Ofuz.net");
    $do_template->setSenderEmail("info@ofuz.net");
    $do_template->setSubject("Contact ::" . $_SESSION['do_contact']->lastname . " " . $_SESSION['do_contact']->firstname);
    //$do_template->setMessage("You have received a contact");
    $do_template->bodytext = "You have received a contact";
    $do_template->bodyhtml = nl2br($do_template->bodytext);
    $emailer = new Radria_Emailer();
    $emailer->setEmailTemplate($do_template);
    $emailer->mergeArray($email_data);
    $emailer->addTo($email_mbl);
    $vcf_file = file_get_contents($file_path);
    $at = $emailer->createAttachment($vcf_file);
    $at->type = 'text/x-vcard';
    //$at->disposition = Zend_Mime::DISPOSITION_INLINE;
    $at->encoding = Zend_Mime::ENCODING_BASE64;
    $at->filename = $file_name . '.vcf';
    try {
        $emailer->send();
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:public_profile_vcard.php


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