• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Mailer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: executeRegistrationSubmit

 public function executeRegistrationSubmit(sfWebRequest $request)
 {
     $this->forwardErrorIf($this->getUser()->isAuthenticated(), "User can not register if already logged in.");
     $this->forward404Unless($request->isMethod('post'));
     $this->form = new RegistrationForm();
     $this->form->bind($request->getParameter('register'));
     if ($this->form->isValid()) {
         $account = $this->form->save();
         $profile = new Profile();
         $profile->uid = $account->id;
         $profile->username = $account->username;
         $profile->first_name = $request->getPostParameter('register[first_name]');
         $profile->middle_name = $request->getPostParameter('register[middle_name]');
         $profile->last_name = $request->getPostParameter('register[last_name]');
         $profile->name = $profile->first_name . " " . $profile->middle_name . " " . $profile->last_name;
         $profile->pic = "0.jpg";
         $profile->save();
         $mailer = new Mailer();
         if ($mailer->send($account->email, sfConfig::get('app_registration_email_from_address'), sfConfig::get('app_site_name'), sfConfig::get('app_registration_email_subject'), "                    \nDear " . $profile->first_name . ",\n\n\nWelcome to " . sfConfig::get('app_site_name') . ".  We are very pleased you decided to start the\nnext generation of your online social life with us!  Below you will\nfind an activation link.  Please click this link to verify your\naccount before logging in.  If you have any trouble, please contact\nus via the \"Contact\" link on the home page of our web site.\n\n\nVERIFICATION LINK (Please click or paste into your browser address bar)\n-----------------------------------------------------------------------\n" . "http://rks.ath.cx:8080" . $this->generateUrl('verify') . '/id/' . $account->id . '/vid/' . md5($account->created_at) . "\n-----------------------------------------------------------------------\n\nIf you feel you were added to our system by mistake, please contact\nus via the \"Contact\" link on the home page of our web site.\n\n--The " . sfConfig::get('app_site_name') . " Support Team\n                    ")) {
             $this->getUser()->setFlash('info', "Registration was successful, please check your email to verify your account");
             $this->redirect('account/login');
         } else {
             $this->getUser()->setFlash('error', "Error occured sending with our mail server, please register again using a different username");
             $this->redirect('account/register');
         }
     }
     $this->setTemplate('register');
 }
开发者ID:rsanders16,项目名称:NexusPlus,代码行数:28,代码来源:actions.class.php


示例2: actionPerform

 function actionPerform(&$skin, $moduleID)
 {
     $recordSet = $skin->main->databaseConnection->Execute("SELECT user_groups.* , COUNT(users.name) AS user_count \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{$skin->main->databaseTablePrefix}user_groups AS user_groups LEFT OUTER JOIN\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{$skin->main->databaseTablePrefix}users AS users\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tON\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuser_groups.user_group_id = users.user_group_id\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuser_groups.user_group_id>1\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGROUP BY\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuser_groups.user_group_id");
     //Check for error, if an error occured then report that error
     if (!$recordSet) {
         trigger_error("Unable to get user list\nreason is : " . $skin->main->databaseConnection->ErrorMsg());
     } else {
         $rows = $recordSet->GetRows();
         $skin->main->controlVariables["sendMessage"]['groupList'] = $rows;
         $skin->main->controlVariables["sendMessage"]['moduleId'] = $this->getModuleID($skin->main);
     }
     $skin->main->controlVariables["sendMessage"]['errorInfo'] = "";
     $skin->main->controlVariables["sendMessage"]['succeed'] = false;
     if (isset($_POST["event"]) && $_POST["event"] == 'sendMessage') {
         $mailer = new Mailer($skin->main);
         for ($i = 0; $i < sizeof($_POST["groups"]); $i++) {
             $recordSet = $skin->main->databaseConnection->Execute("SELECT username FROM {$skin->main->databaseTablePrefix}users AS users WHERE user_group_id=" . $_POST['groups'][$i]);
             if (!$recordSet) {
                 trigger_error("Unable to get group members\nreason is : " . $skin->main->databaseConnection->ErrorMsg());
                 return "";
             } else {
                 $rows = $recordSet->GetRows();
                 for ($j = 0; $j < sizeof($rows); $j++) {
                     $mailer->addUserAddress($rows[$j]["username"]);
                 }
             }
         }
         $mailer->Subject = $_POST["subject"];
         $mailer->Body = $_POST["content"];
         $mailer->Send();
         $skin->main->controlVariables["sendMessage"]['errorInfo'] = $mailer->ErrorInfo;
         $skin->main->controlVariables["sendMessage"]['succeed'] = $mailer->ErrorInfo == "";
     }
 }
开发者ID:BackupTheBerlios,项目名称:alumni-online-svn,代码行数:34,代码来源:sendMessage.php


示例3: handle

 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     //
     $mailer->send('emails.welcome', ['user' => $this->user], function ($m) {
         //
     });
 }
开发者ID:palhimanshu1991,项目名称:dastangoi,代码行数:12,代码来源:SendReminderEmail.php


示例4: handle

 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $mailer->send('mail.welcome', ['data' => 'data'], function ($message) {
         $message->from('[email protected]', 'Christian Nwmaba');
         $message->to('[email protected]');
     });
 }
开发者ID:aaronleslie,项目名称:aaronunix,代码行数:12,代码来源:SendWelcomeEmail.php


示例5: fn_init_mailer

/**
 * Init mail engine
 *
 * @return boolean always true
 */
function fn_init_mailer()
{
    if (defined('MAILER_STARTED')) {
        return true;
    }
    $mailer_settings = fn_get_settings('Emails');
    if (!(include DIR_CORE . 'class.mailer.php')) {
        fn_error(debug_backtrace(), "Can't find Mail class", false);
    }
    $mailer = new Mailer();
    $mailer->LE = defined('IS_WINDOWS') ? "\r\n" : "\n";
    $mailer->PluginDir = DIR_LIB . 'phpmailer/';
    if ($mailer_settings['mailer_send_method'] == 'smtp') {
        $mailer->IsSMTP();
        $mailer->SMTPAuth = $mailer_settings['mailer_smtp_auth'] == 'Y' ? true : false;
        $mailer->Host = $mailer_settings['mailer_smtp_host'];
        $mailer->Username = $mailer_settings['mailer_smtp_username'];
        $mailer->Password = $mailer_settings['mailer_smtp_password'];
    } elseif ($mailer_settings['mailer_send_method'] == 'sendmail') {
        $mailer->IsSendmail();
        $mailer->Sendmail = $mailer_settings['mailer_sendmail_path'];
    } else {
        $mailer->IsMail();
    }
    Registry::set('mailer', $mailer);
    define('MAILER_STARTED', true);
    return true;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:33,代码来源:fn.init.php


示例6: lostpass

 public function lostpass()
 {
     if ($this->f3->exists('POST.lostpass')) {
         $audit = \Audit::instance();
         $this->f3->scrub($_POST);
         $this->f3->set('SESSION.flash', array());
         $members = new Members($this->db);
         // validate form
         if (!$audit->email($this->f3->get('POST.email'), FALSE)) {
             $this->f3->push('SESSION.flash', array('type' => 'warning', 'msg' => 'Invalid email address'));
         }
         if ($members->count(array('email=?', $this->f3->get('POST.email'))) == 0) {
             $this->f3->push('SESSION.flash', array('type' => 'warning', 'msg' => 'Couldn\'t find an account associated with that email address.'));
         }
         if (count($this->f3->get('SESSION.flash')) === 0) {
             // generate random password
             $this->f3->set('password', md5(time()));
             $this->f3->set('POST.password', password_hash($this->f3->get('password'), PASSWORD_DEFAULT));
             $mailer = new Mailer();
             $message = $mailer->message()->setSubject($this->f3->get('tcgname') . ': Password Reset')->setFrom(array($this->f3->get('noreplyemail') => $this->f3->get('tcgname')))->setTo(array($this->f3->get('POST.email')))->setReplyTo(array($this->f3->get('tcgemail')))->setBody(Template::instance()->render('app/templates/emails/pwreset.htm'), 'text/html');
             // save new password and email to member
             if ($members->edit($members->read(array('email=?', $this->f3->get('POST.email')), [])[0]->id, array('password')) && $mailer->send($message)) {
                 $this->f3->push('SESSION.flash', array('type' => 'success', 'msg' => 'Your password has been reset! Please check your email.'));
             } else {
                 $this->f3->push('SESSION.flash', array('type' => 'danger', 'msg' => 'Password reset failed. Please try again or contact us for assistance.'));
             }
         }
     }
     $this->f3->set('content', 'app/views/lostpass.htm');
     echo Template::instance()->render('app/templates/default.htm');
 }
开发者ID:Renako,项目名称:mytcg-f3,代码行数:31,代码来源:MembersController.php


示例7: sandmailAction

 function sandmailAction()
 {
     $firstnameErrText = "";
     $lastnameErrText = "";
     $addressErrText = "";
     $exemplarsErrText = "";
     if (empty($_POST['firstname'])) {
         $firstnameErrText = "не ввели имя!";
     }
     if (empty($_POST['lastname'])) {
         $lastnameErrText = "<span class=err> не ввели фамилию! </span> ";
     }
     if (empty($_POST['address'])) {
         $addressErrText = "<span class=err> не ввели адрес! </span> ";
     }
     if (empty($_POST['exemplars'])) {
         $exemplarsErrText = "<span class=err> не выбрано количество! </span> ";
     }
     if (!empty($_POST['firstname']) && !empty($_POST['lastname']) && !empty($_POST['address']) && !empty($_POST['exemplars'])) {
         $body = $row['FIO'] . "\r\n" . $row['BookName'] . ", количество: " . $_POST["exemplars"] . "\r\n" . $_POST["firstname"] . " " . $_POST["lastname"] . " " . $_POST["address"];
         $title = substr(htmlspecialchars(trim($_POST['lastname'])), 0, 1000) . " ";
         $title .= substr(htmlspecialchars(trim($_POST['firstname'])), 0, 1000) . ", ";
         $title .= "Адресс :" . substr(htmlspecialchars(trim($_POST['address'])), 0, 1000);
         $to = '[email protected]';
         $sendaddress = mail($to, $title, 'Заказ:' . $body);
         $mailer = new Mailer();
         try {
             $mailer->send($to, $title, 'Заказ:' . $body);
         } catch (Exception $err) {
             $sendaddressErr = true;
         }
     }
     include_once 'views/sendmail.tpl';
 }
开发者ID:aleksandr-tkachuk,项目名称:bookshop,代码行数:34,代码来源:detailsController.php


示例8: indexAction

 /**
  * Handles requested "/" route
  */
 public function indexAction()
 {
     // handle contact form
     if (!empty($_POST['form_submit'])) {
         $formValidator = new FormValidator($_POST['form'], $this->view);
         // if there were no errors
         if ($formValidator->isValid()) {
             // format user submitted data
             $data = array();
             $data[] = '<table>';
             foreach ($_POST['form'] as $field => $value) {
                 $data[] = '<tr><th>' . ucwords(str_replace(array('-', '_'), ' ', $field)) . '</th><td>' . nl2br($value) . '</td></tr>';
             }
             $data[] = '</table>';
             // send message
             $mailer = new Mailer();
             $result = $mailer->sendSystemMessage(implode("\n", $data), $_POST['form_submit']);
             if ($result) {
                 $this->router->redirect('/thanks');
                 die;
             }
         } else {
             $this->errorMessages = $formValidator->getFormattedErrors();
         }
     }
 }
开发者ID:ArtifexTech,项目名称:life-jacket,代码行数:29,代码来源:Controller.php


示例9: actionPerform

 function actionPerform(&$skin, $moduleID)
 {
     $recordSet = $skin->main->databaseConnection->Execute("SELECT * FROM {$skin->main->databaseTablePrefix}users");
     //Check for error, if an error occured then report that error
     if (!$recordSet) {
         trigger_error("Unable to get user list\nreason is : " . $skin->main->databaseConnection->ErrorMsg());
     } else {
         $rows = $recordSet->GetRows();
         $skin->main->controlVariables["sendMessage"]['userList'] = $rows;
         $skin->main->controlVariables["sendMessage"]['moduleId'] = $this->getModuleID($skin->main);
     }
     $skin->main->controlVariables["sendMessage"]['errorInfo'] = "";
     $skin->main->controlVariables["sendMessage"]['succeed'] = false;
     if (isset($_POST["event"]) && $_POST["event"] == 'sendMessage') {
         $mailer = new Mailer($skin->main);
         for ($i = 0; $i < sizeof($_POST["users"]); $i++) {
             $mailer->addUserAddress($_POST["users"][$i]);
         }
         $mailer->Subject = $_POST["subject"];
         $mailer->Body = $_POST["content"];
         $mailer->Send();
         $skin->main->controlVariables["sendMessage"]['errorInfo'] = $mailer->ErrorInfo;
         $skin->main->controlVariables["sendMessage"]['succeed'] = $mailer->ErrorInfo == "";
     }
 }
开发者ID:BackupTheBerlios,项目名称:alumni-online-svn,代码行数:25,代码来源:sendMessage.php


示例10: process

 private function process()
 {
     $this->f3->scrub($_POST);
     $audit = \Audit::instance();
     $this->f3->set('SESSION.flash', array());
     // validate form
     if (!preg_match("/^[\\w\\- ]{2,30}\$/", $this->f3->get('POST.name'))) {
         $this->f3->push('SESSION.flash', array('type' => 'warning', 'msg' => 'Invalid name.'));
     }
     if (!$audit->email($this->f3->get('POST.email'), FALSE)) {
         $this->f3->push('SESSION.flash', array('type' => 'warning', 'msg' => 'Invalid email address'));
     }
     if (!empty($this->f3->get('POST.url')) && !$audit->url($this->f3->get('POST.url'))) {
         $this->f3->push('SESSION.flash', array('type' => 'warning', 'msg' => 'Invalid URL.'));
     }
     if (empty($this->f3->get('POST.message'))) {
         $this->f3->push('SESSION.flash', array('type' => 'warning', 'msg' => 'Please include a message!'));
     }
     // honey pot
     if ($this->f3->get('POST.username') !== '') {
         $this->f3->push('SESSION.flash', array('type' => 'warning', 'msg' => 'Please do not use autofill or similar tools!'));
     }
     // if there are no errors, process the form
     if (count($this->f3->get('SESSION.flash')) === 0) {
         $this->f3->set('POST.level', $this->f3->get('member')->level + 1);
         $mailer = new Mailer();
         $message = $mailer->message()->setSubject($this->f3->get('tcgname') . ': Contact Form')->setFrom(array($this->f3->get('noreplyemail') => 'MyTCG'))->setTo(array($this->f3->get('tcgemail')))->setReplyTo(array($this->f3->get('POST.email')))->setBody(Template::instance()->render('app/templates/emails/contact.htm'), 'text/html');
         if ($mailer->send($message)) {
             $this->f3->push('SESSION.flash', array('type' => 'success', 'msg' => 'Your form has been sent. Thanks for contacting us!'));
         } else {
             $this->f3->push('SESSION.flash', array('type' => 'danger', 'msg' => 'There was a problem processing your request. Please try again or contact us for assistance!'));
         }
     }
 }
开发者ID:Renako,项目名称:mytcg-f3,代码行数:34,代码来源:ContactController.php


示例11: actionIndex

 /**
  * Invitation form and processing of invited user details
  */
 public function actionIndex($p)
 {
     if ($this->request->isPost()) {
         $firstName = Fari_Decode::accents($this->request->getPost('first'));
         $lastName = Fari_Decode::accents($this->request->getPost('last'));
         $email = $this->request->getPost('email');
         if (!Fari_Filter::isEmail($email) or empty($firstName)) {
             $this->bag->message = array('status' => 'fail', 'message' => 'Whoops, make sure you enter a full name and proper email address.');
             $this->bag->first = $this->request->getRawPost('first');
             $this->bag->last = $this->request->getRawPost('last');
             $this->bag->email = $this->request->getRawPost('email');
         } else {
             $name = $this->accounts->newInvitation($firstName, $lastName, $email);
             // mail the instructions
             $mail = new Mailer();
             try {
                 $mail->sendInvitation();
             } catch (UserNotFoundException $e) {
                 $this->redirectTo('/error404/');
             }
             $this->flashSuccess = "{$name} is now added to your account. An email with instructions was sent to {$email}";
             $this->redirectTo('/users/');
         }
     }
     $this->bag->tabs = $this->user->inRooms();
     $this->renderAction('new');
 }
开发者ID:radekstepan,项目名称:Clubhouse,代码行数:30,代码来源:InvitationsPresenter.php


示例12: createProfile

 /**
  * Felhasználói profil létrehozása.
  */
 private function createProfile()
 {
     if (isset($_POST['signUpSubmit'])) {
         include_once FRAME_PATH . 'Mailer.php';
         $mailer = new Mailer();
         $name = $this->db->real_escape_string($_POST['signUpName']);
         $email = $this->db->real_escape_string($_POST['signUpEmail']);
         $pass = $this->db->real_escape_string($_POST['signUpPassword']);
         $passCheck = $this->db->real_escape_string($_POST['signUpPasswordCheck']);
         if (empty($name)) {
             echo '<div class="absErrorHolder"><div class="error">' . SIGNUP_E1 . '</div></div>';
         } else {
             if (empty($email)) {
                 echo '<div class="absErrorHolder"><div class="error">' . SIGNUP_E2 . '</div></div>';
             } else {
                 if (!preg_match("/([\\w\\-]+\\@[\\w\\-]+\\.[\\w\\-]+)/", $email)) {
                     echo '<div class="absErrorHolder"><div class="error">' . SIGNUP_E4 . '</div></div>';
                 } else {
                     if (empty($pass)) {
                         echo '<div class="absErrorHolder"><div class="error">' . SIGNUP_E5 . '</div></div>';
                     } else {
                         if (strlen($pass) < 8) {
                             echo '<div class="absErrorHolder"><div class="error">' . SIGNUP_E6 . '</div></div>';
                         } else {
                             if ($pass != $passCheck) {
                                 echo '<div class="absErrorHolder"><div class="error">' . SIGNUP_E7 . '</div></div>';
                             } else {
                                 $checkEmail = $this->db->query("SELECT email FROM users WHERE email = '" . $email . "'") or $this->dbLog($this->db, self::ME, __LINE__);
                                 if ($checkEmail->num_rows < 1) {
                                     $pass_hash = $this->passwordHash($pass);
                                     $userId = $this->createId($this->db, 12, "users", "userId");
                                     $url_token = $this->createId($this->db, 20, "users", "token");
                                     $sql = "INSERT INTO users (userID, userName, email, password, rights, token) VALUES ('" . $userId . "', '" . $name . "', '" . $email . "', '" . $pass_hash . "', 'pending', '" . $url_token . "')";
                                     $this->db->query($sql) or $this->dbLog($this->db, self::ME, __LINE__);
                                     $mailer->sendAutoMail($email, SIGNUP_MAIL_SUBJECT, SIGNUP_MAIL_BODY . '<a href="http://majtenyim.matyasvendeglo.hu/index.php?m=settings&a=confirmProfile&token=' . $url_token . '">' . SIGNUP_CONFIRM_BTN . '</a>');
                                     $objectId = $this->createId($this->db, 20, 'objects', 'objectId');
                                     $token = $this->createId($this->db, 24, 'objects', 'token');
                                     $sql = "INSERT INTO objects (objectId,token) VALUES ('" . $objectId . "','" . $token . "')";
                                     $this->db->query($sql) or $this->dbLog($this->db, self::ME, __LINE__);
                                     mkdir('sky/' . $token);
                                     $sql = "INSERT INTO metadata (objectId,objectName,objectType,objectSize,owner,lastModifiedByOnline) VALUES ('" . $objectId . "','" . $token . "','folder','0','" . $userId . "','" . date('Y-m-d H:i:s') . "')";
                                     $this->db->query($sql) or $this->dbLog($this->db, self::ME, __LINE__);
                                     $sql = "UPDATE users SET cloudObject = '" . $objectId . "' WHERE userId = '" . $userId . "'";
                                     $this->db->query($sql) or $this->dbLog($this->db, self::ME, __LINE__);
                                     echo '<div class="absErrorHolder"><div class="succeed">' . SIGNUP_SUCCESS . '</div></div>';
                                 } else {
                                     echo '<div class="absErrorHolder"><div class="error">' . SIGNUP_E3 . '</div></div>';
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:majtenyim,项目名称:thesis-webserver,代码行数:59,代码来源:Settings.php


示例13: hook_shipment_post

function hook_shipment_post(&$user, &$shipment, &$session)
{
    $mailer = new Mailer($user['folder']);
    $mailer->addRcpt($shipment->ship_contact, '[email protected]');
    $mailer->dataObj = $shipment->toArray();
    $mailer->dataObj['del_note'] = $session->account_notes . " " . $mailer->dataObj['del_note'];
    $mailer->template = "order_summary";
    $mailer->subject = "WEB ORDER #" . $shipment->ext_id;
    $mailer->send();
}
开发者ID:kamalspalace,项目名称:_dev_minimax,代码行数:10,代码来源:shipment_post.php


示例14: send

 public function send($parsed_object, $parcel, $debug = FALSE)
 {
     $parsed_object->settings = $parcel->settings;
     $mailer = new Mailer($parsed_object);
     $response = $mailer->send();
     if (!$response) {
         $this->show_error('An unknown error has occurred when sending email with your server.');
     }
     return new Postmaster_Service_Response(array('status' => $response ? POSTMASTER_SUCCESS : POSTMASTER_FAILED, 'parcel_id' => $parcel->id, 'channel_id' => isset($parcel->channel_id) ? $parcel->channel_id : FALSE, 'author_id' => isset($parcel->entry->author_id) ? $parcel->entry->author_id : FALSE, 'entry_id' => isset($parcel->entry->entry_id) ? $parcel->entry->entry_id : FALSE, 'gmt_date' => $this->now, 'service' => $parcel->service, 'to_name' => $parsed_object->to_name, 'to_email' => $parsed_object->to_email, 'from_name' => $parsed_object->from_name, 'from_email' => $parsed_object->from_email, 'cc' => $parsed_object->cc, 'bcc' => $parsed_object->bcc, 'subject' => $parsed_object->subject, 'message' => !empty($parsed_object->message) ? $parsed_object->message : $parsed_object->html_message, 'html_message' => $parsed_object->html_message, 'plain_message' => $parsed_object->plain_message, 'parcel' => $parcel));
 }
开发者ID:rhgarage,项目名称:Postmaster,代码行数:10,代码来源:Expressionengine.php


示例15: sendHTML

 /**
  * Send an email as both HTML and plaintext
  * 
  * @return bool
  */
 public function sendHTML($to, $from, $subject, $htmlContent, $attachedFiles = false, $customheaders = false, $plainContent = false)
 {
     $result = $this->sendPostmarkEmail($to, $from, $subject, $htmlContent, $attachedFiles, $customheaders, $plainContent);
     if ($result === false) {
         // Fall back to regular Mailer
         $fallbackMailer = new Mailer();
         $result = $fallbackMailer->sendHTML($to, $from, $subject, $htmlContent, $attachedFiles, $customheaders, $plainContent);
     }
     return $result;
 }
开发者ID:helpfulrobot,项目名称:micschk-silverstripe-mailer-mailgun,代码行数:15,代码来源:PostmarkMailer.php


示例16: send_account_enabled

 /**
  * send_account_enabled
  * This sends the account enabled email for the specified user
  *
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public static function send_account_enabled($username, $fullname, $email)
 {
     $mailer = new Mailer();
     $mailer->set_default_sender();
     $mailer->subject = sprintf(T_("Account enabled at %s"), AmpConfig::get('site_title'));
     $mailer->message = sprintf(T_("Your account %s has been enabled\n\n\n            Please logon using %s"), $username, AmpConfig::get('web_path') . "/login.php");
     $mailer->recipient = $email;
     $mailer->recipient_name = $fullname;
     $mailer->send();
 }
开发者ID:cheese1,项目名称:ampache,代码行数:16,代码来源:registration.class.php


示例17: hook_rate_post

function hook_rate_post(&$user, &$shipment, &$session)
{
    $mailer = new Mailer($user['folder']);
    $mailer->addRcpt($shipment->ship_contact, '[email protected]');
    // change to pickups @ minimaxexpress.com upon launch
    $mailer->addReplyTo($shipment->ship_contact, $shipment->ship_email);
    $mailer->dataObj = $shipment->toArray();
    $mailer->dataObj['attn'] = "Please respond to this rate inquiry!";
    $mailer->template = "quote_summary";
    $mailer->subject = "New Rate Inquiry";
    $mailer->send();
}
开发者ID:kamalspalace,项目名称:_dev_minimax,代码行数:12,代码来源:rate_post.php


示例18: sendMail

 protected function sendMail()
 {
     $mail = new Mailer();
     $mail->From = $_REQUEST['emailFrom'];
     $mail->FromName = $_REQUEST['emailFrom'];
     foreach (explode(",", $_REQUEST['emailTo']) as $emailTo) {
         $mail->AddAddress($emailTo);
     }
     $mail->Subject = $_REQUEST['subject'];
     //$mail->setBodyFromTemplate($data=array(), $template="mail_generic", $altBody=""
     $mail->setBodyFromTemplate(array('body' => $_REQUEST['body']));
     return $mail->Send();
 }
开发者ID:CHILMEX,项目名称:amocasion,代码行数:13,代码来源:AjaxContactAction.php


示例19: afreshSendAction

 /**
  * 重新发送邮件
  *
  * @author          mrmsl <[email protected]>
  * @date            2013-06-13 17:39:13
  *
  * @return void 无返回值
  */
 public function afreshSendAction()
 {
     $msg = L('AFRESH,SEND,CN_YOUJIAN');
     if (!($data = $this->_getPairsData('history_id,add_time'))) {
         $this->_ajaxReturn(false, L('INVALID_PARAM,%data。') . $msg . L('FAILURE'));
     }
     require LIB_PATH . 'Mailer.class.php';
     $mailer = new Mailer($this->_model);
     foreach ($data as $item) {
         $mailer->doMail($item);
     }
     $this->_model->addLog($msg . join(',', array_keys($data)) . L('SUCCESS'), LOG_TYPE_ADMIN_OPERATE);
     $this->_ajaxReturn(true, $msg . L('SUCCESS'));
 }
开发者ID:yunsite,项目名称:yablog,代码行数:22,代码来源:MailHistory.class.php


示例20: onSetAnswer

 public function onSetAnswer(FrontController $sender, Statement $st)
 {
     $users = $st->getSubscribers();
     if ($users) {
         require_once ST_DIR . '/Classes/Mailer.php';
         $mailer = new Mailer();
         $vars = array('answer' => strip_tags($st->getAnswer()), 'st_link' => FrontController::getURLByRoute('view', array('id' => $st->getId()), true), 'title' => $st->getTitle(), 'status' => $st->getStatusName());
         foreach ($users as $user) {
             $vars['username'] = $user->name;
             $vars['unSubscribeLink'] = $this->_getSubscribeLink($user->email, $user->user_id, $st->getId());
             $mailer->sendMail('SubscribeStatementSetAnswer', $user->email, $vars);
         }
     }
 }
开发者ID:dautushenka,项目名称:DLE-Statement,代码行数:14,代码来源:SubscribeEvent.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Main类代码示例发布时间:2022-05-23
下一篇:
PHP Mail_mimePart类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap