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


PHP EmailTemplate::setSenderEmail方法代码示例

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


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

 function eventCancelAccount(EventControler $evtcl)
 {
     //echo 'No cancellation after registration....';
     //echo '<br /> and for the reson that u have given <br />'.$evtcl->fields["reason"].'<br /> no way, no cancellation ';
     //exit;
     if ($evtcl->fields["reason"] != '') {
         $this->deleteContactRelated();
         $this->deleteUserContactNote();
         $this->deleteUserContactSharing();
         $this->deleteUserEmailTemplate();
         $this->deleteInvoiceRelated();
         $this->deleteMessage();
         $this->deleteProjectRelated();
         $this->deleteTask();
         $this->deletewebformuser();
         $this->deleteworkfeed();
         $this->deletenotedraft();
         $this->deletetwitteraccount();
         $this->deletetbreadcrumb();
         $this->deleteUserRel();
         $this->deleteUserSettings();
         $this->deleteUserTags();
         $this->dropContactView();
         $email_template = new EmailTemplate("ofuz_cancel_account_notification");
         $email_template->setSenderName($_SESSION['do_User']->getFullName());
         $email_template->setSenderEmail($_SESSION['do_User']->email);
         $email_data = array('name' => $_SESSION['do_User']->getFullName(), 'email' => $_SESSION['do_User']->email, 'reason' => $evtcl->fields["reason"]);
         $emailer = new Radria_Emailer();
         $emailer->setEmailTemplate($email_template);
         $emailer->mergeArray($email_data);
         $emailer->addTo("philippe@sqlfusion.com");
         //$emailer->addTo("abhik@sqlfusion.com");
         $emailer->send();
         $this->deleteUser();
     } else {
         $_SESSION['in_page_message'] = _("Please Provide a reason before cancelling the account");
         $dispError = new Display('cancel_account.php');
         $dispError->addParam("m", 'e');
         $evtcl->setDisplayNext($dispError);
     }
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:41,代码来源:OfuzCancelAccount.class.php

示例3: sendInvoiceApproveReject

 /**
  * Method to send Send Invoice Apporove/Reject Email to the Invoice Owner
  * @param $iduser -- INT
  * @param $idinvoice -- INT
  * @param $status -- STRING
  * @param $rejected_reason -- STRING
  */
 function sendInvoiceApproveReject($iduser, $idinvoice, $status, $rejected_reason = "")
 {
     $do_inv = new Invoice();
     $do_inv_user = new User();
     $do_contact = new Contact();
     $do_inv->getId($idinvoice);
     $do_inv_user->getId($iduser);
     $do_contact->getId($do_inv->idcontact);
     $total_due = $do_inv->amt_due;
     $inv_num = $do_inv->num;
     $inv_desc = $do_inv->description;
     $inv_address = nl2br($this->Only1brFirstLineBlack($do_inv->invoice_address));
     $contact_name = $do_contact->firstname . ' ' . $do_contact->lastname;
     if ($do_contact->email_address != '') {
         $contact_email = $do_contact->email_address;
     } else {
         $ContactEmail = $do_contact->getChildContactEmail();
         if ($ContactEmail->getNumRows()) {
             $contact_email = $ContactEmail->email_address;
         }
     }
     if ($contact_email == '') {
         $contact_email = 'info@sqlfusion.com';
     }
     if ($status == "Accept") {
         $email_template = new EmailTemplate("ofuz_inv_accept_confirmation");
     }
     $do_user_rel = new UserRelations();
     $invoice_url = $GLOBALS['cfg_ofuz_site_https_base'] . 'inv/' . $do_user_rel->encrypt($idinvoice) . '/' . $do_user_rel->encrypt($do_inv->idcontact);
     //$email_template->setSubject(_("Invoice #").$inv_num.' '.$inv_desc." "._("has been accepted by")." ".$contact_name);
     $email_template->setSenderName($contact_name);
     $email_template->setSenderEmail($contact_email);
     $signature = $inv_address;
     $email_data = array('name' => $contact_name, 'contact' => $contact_name, 'description' => $inv_desc, 'signature' => $signature, 'amount' => $total_due, 'num' => $inv_num, 'invoice_url' => $invoice_url, 'address' => $inv_address);
     $emailer = new Radria_Emailer();
     $emailer->setEmailTemplate($email_template);
     $emailer->mergeArray($email_data);
     $emailer->addTo($do_inv_user->email);
     $emailer->send();
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:47,代码来源:.Invoice.class.php

示例4: eventSendDiscussMessageByEmail

 /** 
  * eventSendDiscussMessageByEmail
  * This will send an email to all the project participant 
  * Using Radria_Emailer and an email template stored in the emailtemplate table.
  * This method uses the currently open project persistant object. 
  * @param Eventcontroler
  */
 function eventSendDiscussMessageByEmail(EventControler $event_controler)
 {
     $this->setLog("\n eventSendDiscussMessageByEmail: starting (" . date("Y/m/d H:i:s"));
     try {
         $co_workers = $_SESSION["do_project"]->getProjectCoWorkers();
         // print_r($co_workers);exit;
         if ($co_workers !== false) {
             $email_template = new EmailTemplate("ofuz_project_discussion");
             $email_nudge = new EmailTemplate("ofuz_project_discussion_nudge");
             $project_task_url = $GLOBALS['cfg_ofuz_site_http_base'] . 'Task/' . $_SESSION['do_project_task']->idproject_task;
             $project_link = $GLOBALS['cfg_ofuz_site_http_base'] . 'Project/' . $_SESSION['do_project']->idproject;
             if ($event_controler->fields['document'] != '') {
                 // If a file is attached
                 $doc_link = $GLOBALS['cfg_ofuz_site_http_base'] . 'files/' . $event_controler->fields['document'];
                 $doc_text = '<br />' . _('Attachment') . ': <a href="' . $doc_link . '"> ' . $event_controler->fields['document'] . '</a>';
             } else {
                 $doc_text = '';
             }
             $message_html = nl2br(stripslashes($event_controler->fields['discuss'] . $doc_text));
             $message_txt = stripslashes($event_controler->fields['discuss'] . $doc_text);
             $email_data = array('project-name' => $_SESSION['do_project']->name, 'project-link' => $project_link, 'discussion-owner' => $_SESSION['do_User']->getFullName(), 'task_name' => $_SESSION['do_project_task']->task_description, 'task_category' => $_SESSION['do_project_task']->task_category, 'message_txt' => $message_txt, 'message_html' => $message_html, 'project-task-link' => $project_task_url);
             $do_discussion_email_setting = new DiscussionEmailSetting();
             if ($_SESSION['do_project_task']->drop_box_code < 10 || count($co_workers) > 19) {
                 foreach ($co_workers as $co_worker) {
                     $global_email_alert = $_SESSION['UserSettings']->getSettingValue('task_discussion_alert', $co_worker['idcoworker']);
                     $global_email_alert_on = true;
                     if (!$global_email_alert) {
                         $global_email_alert_on = true;
                         // means user has not set on/off in the settings and on by default
                     } else {
                         if (is_array($global_email_alert)) {
                             if ($global_email_alert["setting_value"] == 'Yes') {
                                 $global_email_alert_on = true;
                             } else {
                                 $global_email_alert_on = false;
                             }
                         }
                     }
                     //if($_SESSION['UserSettings']->global_task_discussion_alert  != 'No' && !$do_discussion_email_setting->isDiscussionAlertSet($_SESSION['do_project_task']->idproject,'Project',$co_worker['idcoworker']) ){
                     if ($global_email_alert_on && !$do_discussion_email_setting->isDiscussionAlertSet($_SESSION['do_project_task']->idproject_task, 'Project', $co_worker['idcoworker'])) {
                         $emailer = new Radria_Emailer('UTF-8');
                         $emailer->setEmailTemplate($email_template);
                         //$emailer->cleanup();
                         //$emailer->setFrom('support@sqlfusion.com' , 'Ofuz.net');
                         $email_data['firstname'] = $co_worker['firstname'];
                         $emailer->mergeArray($email_data);
                         $this->setLog("\n Sending email to:" . $co_worker['email']);
                         $emailer->addTo($co_worker['email']);
                         $emailer->send();
                     }
                 }
             } else {
                 $co_workers_nudged = array();
                 $co_workers_nudged_emails = array();
                 foreach ($co_workers as $co_worker) {
                     if (preg_match("/@" . $co_worker['firstname'] . "/i", $event_controler->fields['discuss']) || preg_match("/@" . $co_worker['lastname'] . "/i", $event_controler->fields['discuss'])) {
                         //$co_workers_nudged[] = $co_worker;
                         $co_workers_nudged_emails[] = $co_worker['email'];
                         $this->setLog("\n Is nudged:" . $co_worker['firstname'] . " " . $co_worker['lastname'] . " " . $co_worker['email']);
                     }
                 }
                 $emailer = new Radria_Emailer('UTF-8');
                 $email_template->setSenderName($_SESSION['do_User']->getFullName());
                 $email_template->setSenderEmail($_SESSION['do_User']->email);
                 $emailer->setEmailTemplate($email_template);
                 $emailer->addCc($_SESSION['do_project_task']->getDropBoxEmail());
                 $emailer->addHeader("X-ofuz-emailer", $_SESSION['do_User']->iduser);
                 $emailer->mergeArray($email_data);
                 $this->setLog("\n Sending email to:" . $co_workers[0]['email']);
                 $someone_note_nudged = false;
                 foreach ($co_workers as $to_worker) {
                     /*
                         Check if the Co-Worker is supposed to get the email
                     */
                     $global_email_alert = $_SESSION['UserSettings']->getSettingValue('task_discussion_alert', $to_worker['idcoworker']);
                     $global_email_alert_on = true;
                     if (!$global_email_alert) {
                         $global_email_alert_on = true;
                         //means user has not set on/off in the settings and on by default
                     } else {
                         if (is_array($global_email_alert)) {
                             if ($global_email_alert["setting_value"] == 'Yes') {
                                 $global_email_alert_on = true;
                             } else {
                                 $global_email_alert_on = false;
                             }
                         }
                     }
                     /* if($_SESSION['UserSettings']->global_task_discussion_alert  != 'No' 
                        && !$do_discussion_email_setting->isDiscussionAlertSet($_SESSION['do_project_task']->idproject_task,$to_worker['idcoworker']) 
                        && !in_array($to_worker['email'], $co_workers_nudged_emails)){*/
                     if ($global_email_alert_on && !$do_discussion_email_setting->isDiscussionAlertSet($_SESSION['do_project_task']->idproject, 'Project', $to_worker['idcoworker']) && !in_array($to_worker['email'], $co_workers_nudged_emails)) {
                         $email_to = $to_worker['email'];
//.........这里部分代码省略.........
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:101,代码来源:.ProjectDiscuss.class.php

示例5: array

                    $docustomer_invoice->getId($_SESSION['do_invoice']->idinvoice);
                    $email_data = array('name' => $customer_name, 'company' => $do_user_data->company, 'description' => $docustomer_invoice->desc, 'signature' => $signature, 'amount' => $paid_memebership_amount, 'num' => $docustomer_invoice->num, 'refnum' => $result['response']['id'], 'paytype' => 'Stripe', 'username' => $do_user_data->firstname, 'invoice_num' => $docustomer_invoice->num);
                    //Notify User by email about his payment
                    if (!empty($customer_email)) {
                        $emailer = new Radria_Emailer();
                        $email_template = new EmailTemplate("ofuz_inv_payment_confirmation");
                        $email_template->setSenderName($customer_name);
                        $email_template->setSenderEmail($customer_email);
                        $email_template->free();
                        $emailer->setEmailTemplate($email_template);
                        $emailer->mergeArray($email_data);
                        $emailer->addTo($customer_email);
                        print_r($emailer);
                        //$emailer->send();
                    }
                    //Email for admin
                    $doemail_template_adm = new EmailTemplate("ofuz_inv_payment_confirmation_adm");
                    $doemail_template_adm->setSenderName('Admin');
                    $doemail_template_adm->setSenderEmail($admin_email);
                    $emailer2 = new Radria_Emailer();
                    $emailer2->setEmailTemplate($doemail_template_adm);
                    $emailer2->mergeArray($email_data);
                    $emailer2->addTo($admin_email);
                    print_r($emailer);
                    //$emailer->send();
                }
            }
        }
    }
    $do_invoice->free();
}
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:cron_processstripe_recurrent_invoice.php

示例6: while

if ($ContactWebsite->getNumRows()) {
    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 {
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:public_profile_vcard.php

示例7: sendCoWorkerInvitationEmail

 /**
  * Method to send the Co-Worker invitation email
  * @param $idcoworker -- int
  */
 function sendCoWorkerInvitationEmail($idcoworker)
 {
     $email_template = new EmailTemplate("ofuz_coworker_add_notification");
     $email_template->setSenderName($_SESSION['do_User']->getFullName());
     $email_template->setSenderEmail($_SESSION['do_User']->email);
     $coworker_url = $GLOBALS['cfg_ofuz_site_http_base'] . 'co_workers.php';
     $email_data = array('coworker-name' => $_SESSION['do_User']->getFullName($idcoworker), 'sender-name' => $_SESSION['do_User']->getFullName(), 'coworker_url' => $coworker_url);
     $emailer = new Radria_Emailer();
     $emailer->setEmailTemplate($email_template);
     $emailer->mergeArray($email_data);
     $emailer->addTo($_SESSION['do_User']->getEmailId($idcoworker));
     $emailer->send();
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:17,代码来源:UserRelations.class.php


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