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


PHP Zend_Mail::clearRecipients方法代码示例

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


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

示例1: run

 /**
  * TOAN LE
  * (non-PHPdoc)
  * @see App_Service_Cron_Interface::run()
  */
 public function run()
 {
     if ($this->_data['run']) {
         $view = new Zend_View();
         $view->setScriptPath(PATH_TEMPLATE . DS . 'mailer' . DS . 'cron' . DS);
         /*****/
         $userModel = new Model_Users();
         $adapter = $userModel->getMapper()->getDbTable()->getAdapter();
         $select = $adapter->select();
         $select->from(array('xm_users'), array('*'));
         $select->where("username RLIKE '[^a-zA-Z0-9()_.@\\-]'");
         $result = $adapter->fetchAll($select);
         foreach ($result as $res) {
             try {
                 $view->datas = $res;
                 $body = $view->render('rename_username_unicode.phtml');
                 $smtp = new Zend_Mail('UTF-8');
                 $smtp->clearRecipients();
                 $smtp->setBodyHtml($body);
                 $smtp->addTo($res['email'], $res['username']);
                 //if (file_exists($filename)) {
                 //$attachment = file_get_contents($filename);
                 //$smtp->createAttachment($attachment, 'application/octet-stream', 'attachment', 'base64', $report['fileName']);
                 //unlink($filename);// after done, remove file in server
                 //}
                 $smtp->setSubject('Thong bao thay doi tai khoan');
                 $smtp->send();
                 $message = "Sent mail success to \n";
                 $message .= "Params: \n" . var_export($res, true) . "\n";
                 $message .= "-------------------------------\n\n\n";
             } catch (Zend_Exception $exception) {
                 $message = $exception->getMessage() . "\n" . $exception->getTraceAsString() . "\n\nParams: \n" . var_export($res, true) . "\n";
                 $message .= "-------------------------------\n\n\n";
             }
             if (Zend_Registry::isRegistered('logger')) {
                 $logger = Zend_Registry::get('logger');
             }
             $logger->log($message, Zend_Log::DEBUG);
         }
     }
 }
开发者ID:visualweber,项目名称:appzf1,代码行数:46,代码来源:Sendmail.php

示例2: clearRecipients

 /**
  * Clears list of recipient email addresses
  * and resets the temporary storage
  *
  * @return Pimcore_Mail Provides fluent interface
  */
 public function clearRecipients()
 {
     unset($this->temporaryStorage['To']);
     unset($this->temporaryStorage['Cc']);
     unset($this->temporaryStorage['Bcc']);
     return parent::clearRecipients();
 }
开发者ID:shanky0110,项目名称:pimcore-custom,代码行数:13,代码来源:Mail.php

示例3: array

 * @author Organisation: Queen's University
 * @author Unit: Faculty of Medicine
 * @author Developer: Brandon Thorn <brandon.thorn@queensu.ca>
 * @author Developer: Ryan Warner <ryan.warner@queensu.ca>
 * @copyright Copyright 2012 Queen's Univerity. All Rights Reserved.
 * if they're doing a clerkship rotation in a location that the regional education manages (oshawa)
 */
@set_time_limit(0);
@set_include_path(implode(PATH_SEPARATOR, array(dirname(__FILE__) . "/../core", dirname(__FILE__) . "/../core/includes", dirname(__FILE__) . "/../core/library", get_include_path())));
/**
 * Include the Entrada init code.
 */
require_once "init.inc.php";
$search = array("%LEARNER_NAME%", "%ACCOMMODATION_TITLE%", "%ACCOMMODATION_NUMBER%", "%ACCOMMODATION_STREET%", "%ACCOMMODATION_REGION%", "%INHABITING_START%", "%INHABITING_FINISH%", "%ACCOMMODATION_CONTACT_NAME%", "%ACCOMMODATION_CONTACT_INFO%", "%ACCOMMODATION_LINK%", "%APPLICATION_NAME%");
$mail = new Zend_Mail();
$query = "\tSELECT c.`username`,\n\t\t\t\tCONCAT_WS(' ', c.`firstname`, c.`lastname`) AS `fullname`,\n\t\t\t\tc.`email`,\n\t\t\t\ta.`apartment_title`,\n\t\t\t\ta.`apartment_number`,\n\t\t\t\ta.`apartment_address`,\n\t\t\t\td.`region_name`,\n\t\t\t\ta.`apartment_province`,\n\t\t\t\tb.`aschedule_id`,\n\t\t\t\tFROM_UNIXTIME(b.inhabiting_start) AS inhabiting_start,\n\t\t\t\tFROM_UNIXTIME(b.inhabiting_finish) AS inhabiting_finish,\n\t\t\t\te.`department_id`,\n\t\t\t\te.`department_title`\n\t\t\tFROM `" . CLERKSHIP_DATABASE . "`.`apartments` AS a\n\t\t\tLEFT JOIN `" . CLERKSHIP_DATABASE . "`.`apartment_schedule` AS b\n\t\t\tON a.`apartment_id` = b.`apartment_id`\n\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`user_data` as c\n\t\t\tON b.`proxy_id` = c.`id`\n\t\t\tLEFT JOIN `" . CLERKSHIP_DATABASE . "`.`regions` as d\n\t\t\tON a.`region_id` = d.`region_id`\n\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`departments` as e\n\t\t\tON a.`department_id` = e.`department_id`\n\t\t\tWHERE b.`occupant_title` = ''\n\t\t\tAND DATEDIFF(FROM_UNIXTIME(b.`inhabiting_start`), FROM_UNIXTIME('" . time() . "')) = 30";
$occupants = $db->GetAll($query);
if ($occupants) {
    $email_body = file_get_contents(ENTRADA_ABSOLUTE . "/templates/" . $ENTRADA_TEMPLATE->activeTemplate() . "/email/regionaled-learner-accommodation-notification.txt");
    foreach ($occupants as $occupant) {
        $mail->addHeader("X-Section", $occupant["department_title"] . " Accommodation Notification System", true);
        $mail->setFrom($AGENT_CONTACTS["agent-regionaled"][$occupant["department_id"]]["email"], $AGENT_CONTACTS["agent-regionaled"][$occupant["department_id"]]["name"]);
        $mail->clearSubject();
        $mail->setSubject("Regional Accomodation: " . $occupant["region_name"]);
        $replace = array($occupant["fullname"], $occupant["apartment_title"], $occupant["apartment_number"], $occupant["apartment_address"], $occupant["region_name"], date("l, F j, Y", strtotime($occupant["inhabiting_start"])), date("l, F j, Y", strtotime($occupant["inhabiting_finish"])), $AGENT_CONTACTS["agent-regionaled"][$occupant["department_id"]]["name"], $AGENT_CONTACTS["agent-regionaled"][$occupant["department_id"]]["email"], "https://meds.queensu.ca/central/regionaled/view?id=" . $occupant["aschedule_id"], $AGENT_CONTACTS["agent-regionaled"][$occupant["department_id"]]["name"]);
        $mail->setBodyText(str_replace($search, $replace, $email_body));
        $mail->clearRecipients();
        $mail->addTo($occupant["email"], $occupant["fullname"]);
        $mail->send();
    }
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:regionaled-occupant-notification.php

示例4: sendMailAction

 /**
  * TOAN LE
  * 'payment' . DS . Zend_Registry::get ( 'lang' ) . DS . 'manager.phtml'
  * Enter description here ...
  * @param unknown_type $datas
  * @param unknown_type $templateMail
  */
 public function sendMailAction($subject, $email, $name, $datas, $templateMail, $logger = null)
 {
     $translate = Zend_Registry::get('Zend_Translate');
     if ($logger == null) {
         $logger = App_Util::getLogger("/data/logs/register-email.log");
     }
     $flashMessenger = $this->_helper->getHelper('Messenger');
     $this->view->assign('datas', $datas);
     $this->view->assign('config', $this->config);
     // 2. Request
     switch ($this->config->resources->mail->transport->type) {
         case 'smtp':
             $smtp_config = array('username' => $this->config->resources->mail->transport->username, 'password' => $this->config->resources->mail->transport->password);
             if ($this->config->resources->mail->transport->auth) {
                 $smtp_config['auth'] = 'login';
             }
             $transport = new Zend_Mail_Transport_Smtp($this->config->resources->mail->transport->host, $smtp_config);
             break;
         default:
             break;
     }
     try {
         // 5. Send mail to Administrator
         $email_content = $this->view->render($templateMail);
         try {
             $mail = new Zend_Mail('UTF-8');
             $mail->clearRecipients();
             $mail->setBodyHtml($email_content);
             $mail->setFrom('welcome@like.vn', 'Saga Viet Nam');
             $mail->addTo($email, $name);
             $mail->setSubject($subject);
             $sent = $mail->send();
             //				$mail->send ( $transport );
             $message = "Sent mail success to \n";
             $message .= "\n\nParams: \n" . var_export($datas, true) . "\n";
             $message .= "-------------------------------\n\n\n";
             $status = 1;
             $flashMessenger->addMessage($translate->translate('SEND_MAIL_SUCCESS'));
         } catch (Zend_Exception $e) {
             $message = $e->getMessage() . "\n" . $e->getTraceAsString() . "\n\nParams: \n" . var_export($datas, true) . "\n";
             $message .= "-------------------------------\n\n\n";
             $status = 0;
             $flashMessenger->addMessage($translate->translate('SEND_MAIL_FAILED'));
         }
     } catch (Zend_Exception $e) {
         $message = $e->getMessage() . "\n" . $e->getTraceAsString() . "\n\nParams: \n" . var_export($datas, true) . "\n";
         $message .= "-------------------------------\n\n\n";
         $status = 0;
         $flashMessenger->addMessage($translate->translate('SEND_MAIL_FAILED'));
     }
     $this->setFlashMessenger($flashMessenger);
     $logger->log($message, Zend_Log::DEBUG);
     return $status;
 }
开发者ID:visualweber,项目名称:appzf1,代码行数:61,代码来源:Action.php

示例5: sendConfirmationMail

 /**
  * sendConfirmationMail
  * @author Cornelius Hansjakob <cha@massiveart.com>
  * @version 1.0
  */
 private function sendConfirmationMail()
 {
     $this->core->logger->debug('website->controllers->DatareceiverController->sendConfirmationMail()');
     $mail = new Zend_Mail('utf-8');
     /**
      * config for SMTP with auth
      */
     $config = array('auth' => 'login', 'username' => $this->core->config->mail->params->username, 'password' => $this->core->config->mail->params->password);
     /**
      * SMTP
      */
     $transport = new Zend_Mail_Transport_Smtp($this->core->config->mail->params->host, $config);
     $strHtmlBody = '';
     if ($this->strUserFName != '' && $this->strUserSName != '') {
         $strHtmlBody = '
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
     <html>
     <head>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
       <title></title>
       <style type="text/css">
         body { margin:0; padding:20px; color:#333333; width:100%; height:100%; font-size:12px; font-family: Arial, Sans-Serif; background-color:#ffffff; line-height:16px;}
         span { line-height:15px; font-size:12px; }
         h1 { color:#333333; font-weight:bold; font-size:16px; font-family: Arial, Sans-Serif; padding:0; margin: 20px 0 15px 0; }
         h2 { color:#333333; font-weight:bold; font-size:14px; font-family: Arial, Sans-Serif; padding:0; margin: 20px 0 15px 0; }
         h3 { color:#333333; font-weight:bold; font-size:12px; font-family: Arial, Sans-Serif; padding:0; margin: 20px 0 15px 0; }
         a { color:#000000; font-size:12px; text-decoration:underline; margin:0; padding:0; }
         a:hover { color:#000000; font-size:12px; text-decoration:underline; margin:0; padding:0; }
         p { margin:0 0 10px 0; padding:0; }
       </style>
     </head>
     <body>
     <table cellpadding="0" cellspacing="0" style="width:650px; margin:auto;">
        <tr>
           <td style="padding:20px 15px 20px 15px;">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                 <tr>
                    <td>
                      <h2>Sehr geehrte(r) ' . $this->strUserFName . ' ' . $this->strUserSName . '</h2>                         
                    </td>
                 </tr>
              </table>
           </td>
        </tr>
     </table>
     </body>
     </html>';
     }
     /**
      * set mail subject
      */
     $mail->setSubject($this->strMailSubject);
     /**
      * set html body
      */
     $mail->setBodyHtml($strHtmlBody);
     /**
      * set default FROM address
      */
     $mail->setFrom($this->strSenderMail, $this->strSenderName);
     if ($this->strUserMail != '') {
         $mail->clearRecipients();
         $mail->addTo($this->strUserMail, $this->strUserFName . ' ' . $this->strUserSName);
         /**
          * send mail if mail body is not empty
          */
         if ($strHtmlBody != '') {
             $mail->send($transport);
         }
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:76,代码来源:DatareceiverController.php

示例6: notify_regional_education


//.........这里部分代码省略.........
                        break;
                    case "change-critical":
                        $message = "Attention " . $AGENT_CONTACTS["agent-regionaled"]["name"] . ",\n\n";
                        $message .= $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " has updated an event in " . $whole_name . "'s ";
                        $message .= "clerkship schedule, to which you had previously assigned housing. This update involves a change to the region or the ";
                        $message .= "dates that the event took place in. Due to this critical change taking place, the housing for this event for this ";
                        $message .= "student has been removed.\n\n";
                        if ($result["manage_apartments"]) {
                            $message .= "Please log into the clerkship system and re-assign housing to this student for this event.\n\n";
                        } else {
                            $message .= "Since this event no longer is taking place in a region which is managed by Regional Education, \n";
                            $message .= "no further action is required on your part in the system.\n\n";
                        }
                        $message .= "Information For Reference:\n\n";
                        $message .= "OLD Event Information:\n";
                        $message .= "Event Title:\t" . $event_info["event_title"] . "\n";
                        $message .= "Region:\t\t" . get_region_name($event_info["region_id"]) . "\n";
                        $message .= "Start Date:\t" . date(DEFAULT_DATE_FORMAT, $event_info["event_start"]) . "\n";
                        $message .= "Finish Date:\t" . date(DEFAULT_DATE_FORMAT, $event_info["event_finish"]) . "\n\n";
                        $message .= "NEW Event Information:\n";
                        $message .= "Event Title:\t" . html_decode($result["event_title"]) . "\n";
                        $message .= "Region:\t\t" . $result["region_name"] . "\n";
                        $message .= "Start Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "\n";
                        $message .= "Finish Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_finish"]) . "\n\n";
                        if ($apartments && ($assigned_apartments = @count($apartments))) {
                            $message .= "Apartment" . ($assigned_apartments != 1 ? "s" : "") . " " . $whole_name . " was removed from:\n";
                            foreach ($apartments as $apartment) {
                                $message .= "Apartment Title:\t" . $apartment["apartment_title"] . "\n";
                                $message .= "Inhabiting Start:\t" . date(DEFAULT_DATE_FORMAT, $apartment["inhabiting_start"]) . "\n";
                                $message .= "Inhabiting Finish:\t" . date(DEFAULT_DATE_FORMAT, $apartment["inhabiting_finish"]) . "\n\n";
                            }
                        }
                        $message .= "=======================================================\n\n";
                        $message .= "Deletion Date:\t" . date("r", time()) . "\n";
                        $message .= "Deleted By:\t" . $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " (" . $ENTRADA_USER->getID() . ")\n";
                        break;
                    case "change-non-critical":
                    case "updated":
                    default:
                        $message = "Attention " . $AGENT_CONTACTS["agent-regionaled"]["name"] . ",\n\n";
                        $message .= $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " has updated an event in " . $whole_name . "'s ";
                        $message .= "clerkship schedule, to which you had previously assigned housing.\n\n";
                        $message .= "Important:\n";
                        $message .= "This update does not affect the date or region of this event, as such this change is considered non-critical ";
                        $message .= "and no action is required on your part.\n\n";
                        $message .= "Information For Reference:\n\n";
                        $message .= "OLD Event Information:\n";
                        $message .= "Event Title:\t" . $event_info["event_title"] . "\n";
                        $message .= "Region:\t\t" . get_region_name($event_info["region_id"]) . "\n";
                        $message .= "Start Date:\t" . date(DEFAULT_DATE_FORMAT, $event_info["event_start"]) . "\n";
                        $message .= "Finish Date:\t" . date(DEFAULT_DATE_FORMAT, $event_info["event_finish"]) . "\n\n";
                        $message .= "NEW Event Information:\n";
                        $message .= "Event Title:\t" . html_decode($result["event_title"]) . "\n";
                        $message .= "Region:\t\t" . $result["region_name"] . "\n";
                        $message .= "Start Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "\n";
                        $message .= "Finish Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_finish"]) . "\n\n";
                        if ($apartments && ($assigned_apartments = @count($apartments))) {
                            $message .= "Apartment" . ($assigned_apartments != 1 ? "s" : "") . " " . $whole_name . " is assigned to:\n";
                            foreach ($apartments as $apartment) {
                                $message .= "Apartment Title:\t" . $apartment["apartment_title"] . "\n";
                                $message .= "Inhabiting Start:\t" . date(DEFAULT_DATE_FORMAT, $apartment["inhabiting_start"]) . "\n";
                                $message .= "Inhabiting Finish:\t" . date(DEFAULT_DATE_FORMAT, $apartment["inhabiting_finish"]) . "\n\n";
                            }
                        }
                        $message .= "=======================================================\n\n";
                        $message .= "Updated Date:\t" . date("r", time()) . "\n";
                        $message .= "Update By:\t" . $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " (" . $ENTRADA_USER->getID() . ")\n";
                        break;
                }
                $mail = new Zend_Mail();
                $mail->addHeader("X-Originating-IP", $_SERVER["REMOTE_ADDR"]);
                $mail->addHeader("X-Section", "Clerkship Notify System", true);
                $mail->clearFrom();
                $mail->clearSubject();
                $mail->setFrom($AGENT_CONTACTS["agent-notifications"]["email"], APPLICATION_NAME . ' Clerkship System');
                $mail->setSubject("MEdTech Clerkship System - " . ucwords($action) . " Event");
                $mail->setBodyText($message);
                $mail->clearRecipients();
                $mail->addTo($AGENT_CONTACTS["agent-regionaled"]["email"], $AGENT_CONTACTS["agent-regionaled"]["name"]);
                $sent = true;
                try {
                    $mail->send();
                    application_log("success", "An event change notification has been sent to regional education to notify them of the changes to the event [" . $event_info["event_id"] . "] which will affect the apartment schedule.");
                    return true;
                } catch (Exception $e) {
                    system_log_data("error", "Unable to send " . $action . " notification to regional education. Zend_mail said: " . $e->getMessage());
                    return false;
                }
            } else {
                return true;
            }
        } else {
            // No need to notify Regional Education because the event is already over, just return true.
            return true;
        }
    } else {
        system_log_data("error", "The notify_regional_education() function returned false with no results from the database query. Database said: " . $db->ErrorMsg());
        return false;
    }
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:101,代码来源:functions.inc.php

示例7: sendContactEmail

 protected function sendContactEmail($formValues, array $fields, $language)
 {
     $emailParams = array_merge(array('subject_admin' => 'New Contact Form Submission', 'subject_respond' => 'Thank you for your time', 'template_admin' => 'contact.phtml', 'template_respond' => '%s/contact_auto_respond.phtml', 'layout' => 'layout.phtml'), $this->_globalSettings['email'], $this->_formParams['email']);
     $transport = HCMS_Email_TransportFactory::createFactory($emailParams['sender']);
     //init view
     $emailView = new Zend_View();
     $emailView->setScriptPath($this->getFrontController()->getModuleDirectory('contact') . '/views/scripts/email_templates/');
     $mvcView = clone Zend_Layout::getMvcInstance()->getView();
     if (isset($mvcView->theme)) {
         $emailView->addScriptPath(APPLICATION_PATH . '/../themes/' . $mvcView->theme . '/views/contact/email_templates/');
     }
     $emailView->assign(array('application' => $this->_application, 'data' => $formValues, 'fields' => $fields, 'serverUrl' => $this->view->serverUrl(), 'imagesUrl' => isset($mvcView->theme) ? $this->view->serverUrl() . '/themes/' . $mvcView->theme . '/images/email/' : $this->view->serverUrl() . '/images/email/', 'lang' => $language));
     $body = $this->getEmailBody($emailView, $emailParams, 'template_admin', $language);
     $mail = new Zend_Mail('UTF-8');
     $mail->setBodyHtml($body);
     $mail->setFrom($emailParams['from_email'], $emailParams['from_name']);
     if (!isset($emailParams['disable_admin_email']) || $emailParams['disable_admin_email'] != 'yes') {
         foreach ($emailParams['to_emails'] as $toEmail) {
             $mail->addTo($toEmail['email'], $toEmail['name']);
         }
         $mail->setSubject($this->translate($emailParams['subject_admin']));
         $mail->setReplyTo($formValues['email']);
         $mail->send($transport);
     }
     if ($emailParams['confirmation_email'] == 'yes') {
         $mail->clearRecipients()->clearSubject()->clearReplyTo()->addTo($formValues['email'])->setBodyHtml($this->getEmailBody($emailView, $emailParams, 'template_respond', $language))->setSubject($this->translate($emailParams['subject_respond']));
         if (isset($emailParams['reply_email'])) {
             $mail->setReplyTo($emailParams['reply_email']);
         }
         $mail->send($transport);
     }
 }
开发者ID:bokultis,项目名称:kardiomedika,代码行数:32,代码来源:GenericController.php

示例8: sendConfirmationMail

 /**
  * sendSuccesMail
  * @author Cornelius Hansjakob <cha@massiveart.com>
  * @version 1.0
  */
 private function sendConfirmationMail()
 {
     $this->core->logger->debug('website->controllers->DatareceiverController->sendConfirmationMail()');
     $mail = new Zend_Mail();
     /**
      * config for SMTP with auth
      */
     $config = array('auth' => 'login', 'username' => $this->core->webConfig->mail->params->username, 'password' => $this->core->webConfig->mail->params->password);
     /**
      * SMTP
      */
     $transport = new Zend_Mail_Transport_Smtp($this->core->webConfig->mail->params->host, $config);
     $strHtmlBody = '';
     if ($this->strUserFName != '' && $this->strUserSName != '') {
         $strHtmlBody = '
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
     <html>
     <head>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
       <title></title>
       <style type="text/css">
         body { margin:0; padding:0; color:#000; width:100%; height:100%; font-size:11px; font-family:Verdana, Arial, Sans-Serif; background-color:#ffffff; line-height:15px;}
         input {font-size:11px; font-family:Verdana, Arial, Sans-Serif; }
         span { line-height:14px; font-size:11px; }
         img { padding:0; margin:0; border:0; }
         .tdImg {width:123px; margin:0; padding:0; vertical-align:top; }
         .divider { margin:0; padding:5px 0 15px 0; width:620px; }
         h1 { color:#000; font-weight:bold; font-size:16px; font-family:Verdana, Arial, Sans-Serif; padding:0; margin: 20px 0 15px 0; }
         h2 { color:#000; font-weight:bold; font-size:14px; font-family:Verdana, Arial, Sans-Serif; padding:0; margin: 20px 0 15px 0; }
         h3 { color:#000; font-weight:bold; font-size:12px; font-family:Verdana, Arial, Sans-Serif; padding:0; margin: 20px 0 15px 0; }
         a { color:#3366cc; font-size:11px; text-decoration:none; margin:0; padding:0; }
         a:hover { color:#000; font-size:11px; text-decoration:none; margin:0; padding:0; }
         p { margin:0 0 10px 0; padding:0; }
       </style>
     </head>
     <body>
     <table cellpadding="0" cellspacing="0" style="width:650px; margin:auto;">
        <tr>
           <td style="padding:20px 15px 20px 15px;">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                 <tr>
                    <td>
                      <h2>Sehr geehrte(r) ' . $this->strUserFName . ' ' . $this->strUserSName . '</h2>
                      Vielen Dank f�r Ihre Anmeldung. Diese ist bei uns eingelangt und wir haben
                      Ihren Namen auf die Teilnehmerliste gesetzt. Bei R�ckfragen oder etwaigen �nderungen
                      wird sich der/die zust�ndige Mitarbeiter/in in den n�chsten Tagen mit Ihnen in
                      Verbindung setzen.<br/>
                      Ansonsten stehen wir Ihnen auch gerne telefonisch unter 05572/24465-400 f�r
                      weitere Ausk�nfte zur Verf�gung.<br/><br/>
                      Mit freundlichen Gr��en<br/>
                      Ihr Sportservice-Team<br/><br/><br/>
                      <strong>Sportservice Vorarlberg</strong>, H�chsterstra�e 82, 6850 Dornbirn<br/>
                      <a href="http://www.sportservice-v.at">www.sportservice-v.at</a>, <a href="mailto:info@sportservice-v.at">info@sportservice-v.at</a>, +43 (0)5572 / 244 65 - 400
                    </td>
                 </tr>
              </table>
           </td>
        </tr>
     </table>
     </body>
     </html>';
     }
     /**
      * set mail subject
      */
     $mail->setSubject('Anmeldung - ' . utf8_decode($this->arrFormData['title']));
     /**
      * set html body
      */
     $mail->setBodyHtml($strHtmlBody);
     /**
      * set default FROM address
      */
     $mail->setFrom($this->core->webConfig->mail->from->address, $this->core->webConfig->mail->from->name);
     if ($this->strUserMail != '') {
         $mail->clearRecipients();
         $mail->addTo($this->strUserMail, $this->strUserFName . ' ' . $this->strUserSName);
         /**
          * send mail if mail body is not empty
          */
         if ($strHtmlBody != '') {
             $mail->send($transport);
         }
     }
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:90,代码来源:DatareceiverController.php

示例9: createMailObject

 /**
  * Create zend mail object for sending out
  * the email
  * 
  * @return Zend_Mail
  */
 public function createMailObject()
 {
     $sender = $this->getCampaign()->getSender();
     $recipient = $this->getRecipient();
     $recipient->prepare();
     $mail = new Zend_Mail('utf-8');
     $mail->setSubject($this->getSubject());
     $mail->addTo($recipient->getAddress(), '=?utf-8?B?' . base64_encode($recipient->getName()) . '?=');
     $mail->setMessageId($this->getMessageId());
     $mail->setBodyText($this->getBodyText());
     $mail->setBodyHtml($this->getBodyHtml());
     $mail->setFrom($sender['email'], $sender['name']);
     $mail->addHeader('X-Mailer', 'Mzax-Emarketing ' . Mage::helper('mzax_emarketing')->getVersion());
     $mail->addHeader('X-Mailer-Version', Mage::helper('mzax_emarketing')->getVersion());
     $mail->addHeader('X-Originating-IP', Mage::app()->getRequest()->getServer('SERVER_ADDR'));
     // Add List-Unsubscribe
     if (Mage::getStoreConfigFlag('mzax_emarketing/email/list_unsubscribe', $recipient->getStoreId())) {
         $unsubscribe = array();
         $address = Mage::getStoreConfig('mzax_emarketing/email/list_unsubscribe_address', $recipient->getStoreId());
         if ($address) {
             $unsubscribe[] = "mailto:{$address}?subject=Unsubscribe%20{$recipient->getAddress()}%20({$recipient->getBeaconHash()})";
         }
         foreach ($unsubscribe as &$value) {
             $value = "<{$value}>";
         }
         $unsubscribe[] = $recipient->getUrl('mzax_emarketing/unsubscribe/list', array('id' => $recipient->getBeaconHash()));
         $mail->addHeader('List-Unsubscribe', implode(',', $unsubscribe));
     }
     $this->setCancelEmail(false);
     Mage::dispatchEvent('mzax_emarketing_create_mail_object', array('mail' => $mail, 'recipient' => $recipient, 'outbox_email' => $this));
     if ($this->getCancelEmail()) {
         return null;
     }
     if (Mage::getStoreConfigFlag('mzax_emarketing/email/test_mode', $recipient->getStoreId())) {
         $address = Mage::getStoreConfig('mzax_emarketing/email/test_mode_address', $recipient->getStoreId());
         if (!$address) {
             return null;
         }
         $mail->clearRecipients();
         $mail->addTo($address);
     }
     return $mail;
 }
开发者ID:jsiefer,项目名称:emarketing,代码行数:49,代码来源:Email.php


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