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

PHP UserMailer类代码示例

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

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



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

示例1: contact

 private function contact()
 {
     global $wgEmergencyContact;
     $this->getOutput()->addModules('skins.settlein.special.contact');
     $this->getOutput()->setPageTitle('Contact Us | SettleIn');
     $data = array();
     if ($this->getRequest()->wasPosted()) {
         $name = $this->getRequest()->getVal('name');
         $email = $this->getRequest()->getVal('email');
         $message = $this->getRequest()->getVal('message');
         $reason = $this->getRequest()->getVal('reason');
         $reason = wfMessage('settlein-skin-project-page-contact-field-reason-value-' . ((int) $reason + 1))->plain();
         $to = new MailAddress($wgEmergencyContact);
         $from = new MailAddress($email, $name);
         $subject = "New request from SettleIn website";
         $body = "Reason: " . $reason . "\n\n" . $message;
         UserMailer::send($to, $from, $subject, $body);
         $this->getOutput()->redirect($this->getFullTitle()->getFullURL('success=yes'));
         return false;
     } else {
         if ($this->getRequest()->getVal('success')) {
             $html = Views::forge('contactpost_new', $data);
         } else {
             $html = Views::forge('contact_new', $data);
         }
     }
     $this->getOutput()->addHTML($html);
 }
开发者ID:vedmaka,项目名称:SettleInSkin,代码行数:28,代码来源:SettleInSpecial.php


示例2: execute

 public function execute($subpage)
 {
     global $wgRequest, $wgForceSendgridEmail, $wgForceSchwartzEmail;
     wfProfileIn(__METHOD__);
     // Don't allow just anybody to use this
     if ($this->mChallengeToken != $wgRequest->getVal('challenge')) {
         header("Status: 400");
         header("Content-type: text/plain");
         print "Challenge incorrect";
         wfProfileOut(__METHOD__);
         exit;
     }
     // Make sure we get an email address
     $this->mAccount = $wgRequest->getVal('account');
     if (!$this->mAccount) {
         header("Status: 400");
         header("Content-type: text/plain");
         print "Parameter 'account' required";
         wfProfileOut(__METHOD__);
         exit;
     }
     # These two both have defaults
     $this->mText = $wgRequest->getVal('text', $this->mText);
     $this->mConfirmToken = $wgRequest->getVal('token', $this->mConfirmToken);
     $wgForceSendgridEmail = $wgRequest->getVal('force') == 'sendgrid';
     $wgForceSchwartzEmail = $wgRequest->getVal('force') == 'schwartz';
     UserMailer::send(new MailAddress($this->mAccount), new MailAddress('[email protected]'), "EmailTest - End to end test", $this->mConfirmToken . "\n" . $this->mText, null, null, "emailtest");
     header("Status: 200");
     header("Content-type: text/plain");
     print $this->mConfirmToken;
     wfProfileOut(__METHOD__);
     exit;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:33,代码来源:SpecialEmailTest.php


示例3: execute

 public function execute()
 {
     $params = $this->extractRequestParams();
     // Validation
     if (!User::isValidEmailAddr($params['email'])) {
         $this->dieUsage('The email address does not appear to be valid', 'invalidemail');
     }
     // Verification code
     $code = md5('EmailCapture' . time() . $params['email'] . $params['info']);
     // Insert
     $dbw = wfGetDB(DB_MASTER);
     $dbw->insert('email_capture', array('ec_email' => $params['email'], 'ec_info' => isset($params['info']) ? $params['info'] : null, 'ec_code' => $code), __METHOD__, array('IGNORE'));
     if ($dbw->affectedRows()) {
         // Send auto-response
         global $wgEmailCaptureSendAutoResponse, $wgEmailCaptureAutoResponse;
         $title = SpecialPage::getTitleFor('EmailCapture');
         $link = $title->getCanonicalURL();
         $fullLink = $title->getCanonicalURL(array('verify' => $code));
         if ($wgEmailCaptureSendAutoResponse) {
             UserMailer::send(new MailAddress($params['email']), new MailAddress($wgEmailCaptureAutoResponse['from'], $wgEmailCaptureAutoResponse['from-name']), wfMsg($wgEmailCaptureAutoResponse['subject-msg']), wfMsg($wgEmailCaptureAutoResponse['body-msg'], $fullLink, $link, $code), $wgEmailCaptureAutoResponse['reply-to'], $wgEmailCaptureAutoResponse['content-type']);
         }
         $r = array('result' => 'Success');
     } else {
         $r = array('result' => 'Failure', 'message' => 'Duplicate email address');
     }
     $this->getResult()->addValue(null, $this->getModuleName(), $r);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:27,代码来源:ApiEmailCapture.php


示例4: sendMail

 /**
  * Quickie wrapper function for sending out an email as properly rendered
  * HTML instead of plaintext.
  *
  * The functions in this class that call this function used to use
  * User::sendMail(), but it was causing the mentioned bug, hence why this
  * function had to be introduced.
  *
  * @see https://bugzilla.wikimedia.org/show_bug.cgi?id=68045
  *
  * @param User $string User (object) whom to send an email
  * @param string $subject Email subject
  * @param $string $body Email contents (HTML)
  * @return Status object
  */
 public function sendMail($user, $subject, $body)
 {
     global $wgPasswordSender;
     $sender = new MailAddress($wgPasswordSender, wfMessage('emailsender')->inContentLanguage()->text());
     $to = new MailAddress($user);
     return UserMailer::send($to, $sender, $subject, $body, null, 'text/html; charset=UTF-8');
 }
开发者ID:Reasno,项目名称:SocialProfile,代码行数:22,代码来源:UserRelationshipClass.php


示例5: after_create

 public function after_create()
 {
     UserMailer::deliver_new_user($this->email, $this);
     $path = FileUtils::join(NIMBLE_ROOT, 'get', $this->username);
     FileUtils::mkdir_p($path);
     chmod($path, 0755);
 }
开发者ID:xetorthio,项目名称:pearfarm_channel_server,代码行数:7,代码来源:user.php


示例6: sendExternalMails

 /**
  * Send email to external addresses
  */
 private function sendExternalMails()
 {
     global $wgNewUserNotifEmailTargets, $wgSitename;
     foreach ($wgNewUserNotifEmailTargets as $target) {
         UserMailer::send(new MailAddress($target), new MailAddress($this->sender), $this->makeSubject($target, $this->user), $this->makeMessage($target, $this->user));
     }
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:10,代码来源:NewUserNotif.class.php


示例7: notifyWithEmail

 /**
  * Send a Notification to a user by email
  *
  * @param $user User to notify.
  * @param $event EchoEvent to notify about.
  * @return bool
  */
 public static function notifyWithEmail($user, $event)
 {
     // No valid email address or email notification
     if (!$user->isEmailConfirmed() || $user->getOption('echo-email-frequency') < 0) {
         return false;
     }
     // Final check on whether to send email for this user & event
     if (!wfRunHooks('EchoAbortEmailNotification', array($user, $event))) {
         return false;
     }
     // See if the user wants to receive emails for this category or the user is eligible to receive this email
     if (in_array($event->getType(), EchoNotificationController::getUserEnabledEvents($user, 'email'))) {
         global $wgEchoEnableEmailBatch, $wgEchoNotifications, $wgNotificationSender, $wgNotificationSenderName, $wgNotificationReplyName, $wgEchoBundleEmailInterval;
         $priority = EchoNotificationController::getNotificationPriority($event->getType());
         $bundleString = $bundleHash = '';
         // We should have bundling for email digest as long as either web or email bundling is on, for example, talk page
         // email bundling is off, but if a user decides to receive email digest, we should bundle those messages
         if (!empty($wgEchoNotifications[$event->getType()]['bundle']['web']) || !empty($wgEchoNotifications[$event->getType()]['bundle']['email'])) {
             wfRunHooks('EchoGetBundleRules', array($event, &$bundleString));
         }
         if ($bundleString) {
             $bundleHash = md5($bundleString);
         }
         MWEchoEventLogging::logSchemaEcho($user, $event, 'email');
         // email digest notification ( weekly or daily )
         if ($wgEchoEnableEmailBatch && $user->getOption('echo-email-frequency') > 0) {
             // always create a unique event hash for those events don't support bundling
             // this is mainly for group by
             if (!$bundleHash) {
                 $bundleHash = md5($event->getType() . '-' . $event->getId());
             }
             MWEchoEmailBatch::addToQueue($user->getId(), $event->getId(), $priority, $bundleHash);
             return true;
         }
         $addedToQueue = false;
         // only send bundle email if email bundling is on
         if ($wgEchoBundleEmailInterval && $bundleHash && !empty($wgEchoNotifications[$event->getType()]['bundle']['email'])) {
             $bundler = MWEchoEmailBundler::newFromUserHash($user, $bundleHash);
             if ($bundler) {
                 $addedToQueue = $bundler->addToEmailBatch($event->getId(), $priority);
             }
         }
         // send single notification if the email wasn't added to queue for bundling
         if (!$addedToQueue) {
             // instant email notification
             $toAddress = new MailAddress($user);
             $fromAddress = new MailAddress($wgNotificationSender, $wgNotificationSenderName);
             $replyAddress = new MailAddress($wgNotificationSender, $wgNotificationReplyName);
             // Since we are sending a single email, should set the bundle hash to null
             // if it is set with a value from somewhere else
             $event->setBundleHash(null);
             $email = EchoNotificationController::formatNotification($event, $user, 'email', 'email');
             $subject = $email['subject'];
             $body = $email['body'];
             UserMailer::send($toAddress, $fromAddress, $subject, $body, $replyAddress);
             MWEchoEventLogging::logSchemaEchoMail($user, 'single');
         }
     }
     return true;
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:67,代码来源:Notifier.php


示例8: sendEmail

 function sendEmail(&$u, &$content)
 {
     global $wgServer;
     wfLoadExtensionMessages('ThumbsEmailNotifications');
     $email = $u->getEmail();
     $userText = $u->getName();
     $semi_rand = md5(time());
     $mime_boundary = "==MULTIPART_BOUNDARY_{$semi_rand}";
     $mime_boundary_header = chr(34) . $mime_boundary . chr(34);
     $userPageLink = self::getUserPageLink($userText);
     $html_text = wfMsg('tn_email_html', wfGetPad(''), $userPageLink, $content);
     $plain_text = wfMsg('tn_email_plain', $userText, $u->getTalkPage()->getFullURL());
     $body = "This is a multi-part message in MIME format.\n\n--{$mime_boundary}\nContent-Type: text/plain; charset=us-ascii\nContent-Transfer-Encoding: 7bit\n\n{$plain_text}\n\n--{$mime_boundary}\nContent-Type: text/html; charset=us-ascii\nContent-Transfer-Encoding: 7bit\n\n{$html_text}";
     $from = new MailAddress(wfMsg('aen_from'));
     $subject = "Congratulations! You just got a thumbs up";
     $isDev = false;
     if (strpos($_SERVER['HOSTNAME'], "wikidiy.com") !== false || strpos($wgServer, "wikidiy.com") !== false) {
         wfDebug("AuthorEmailNotification in dev not notifying: TO: " . $userText . ",FROM: {$from_name}\n");
         $isDev = true;
         $subject = "[FROM DEV] {$subject}";
     }
     if (!$isDev) {
         $to = new MailAddress($email);
         UserMailer::send($to, $from, $subject, $body, null, "multipart/alternative;\n" . "     boundary=" . $mime_boundary_header);
     }
     // send one to our test email account for debugging
     /*
     $to = new MailAddress ('[email protected]');
     UserMailer::send($to, $from, $subject, $body, null, "multipart/alternative;\n" .
     				"     boundary=" . $mime_boundary_header) ;
     */
     return true;
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:33,代码来源:ThumbsEmailNotifications.body.php


示例9: run

 /**
  * Run a SMW_NMSendMailJob job
  * @return boolean success
  */
 function run()
 {
     wfDebug(__METHOD__);
     wfProfileIn(__METHOD__);
     UserMailer::send($this->params['to'], $this->params['from'], $this->params['subj'], $this->params['body'], $this->params['replyto']);
     wfProfileOut(__METHOD__);
     return true;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:12,代码来源:SMW_NMSendMailJob.php


示例10: saveStory

 /**
  * Store the submitted story in the database, and return a page telling the user his story has been submitted.
  * 
  * @param string $title
  */
 private function saveStory($title)
 {
     global $wgRequest, $wgUser;
     global $egStoryboardEmailSender, $egStoryboardEmailSenderName, $egStoryboardBoardUrl;
     $dbw = wfGetDB(DB_MASTER);
     $story = array('story_lang_code' => $wgRequest->getText('lang'), 'story_author_name' => $wgRequest->getText('name'), 'story_author_location' => $wgRequest->getText('location'), 'story_author_occupation' => $wgRequest->getText('occupation'), 'story_author_email' => $wgRequest->getText('email'), 'story_title' => $title, 'story_text' => $wgRequest->getText('storytext'), 'story_created' => $dbw->timestamp(time()), 'story_modified' => $dbw->timestamp(time()));
     // If the user is logged in, also store his user id.
     if ($wgUser->isLoggedIn()) {
         $story['story_author_id'] = $wgUser->getId();
     }
     $dbw->insert('storyboard', $story);
     $to = new MailAddress($wgRequest->getText('email'), $wgRequest->getText('name'));
     $from = new MailAddress($egStoryboardEmailSender, $egStoryboardEmailSenderName);
     $subject = wfMsg('storyboard-emailtitle');
     $body = wfMsgExt('storyboard-emailbody', 'parsemag', $title, $egStoryboardBoardUrl);
     $mailer = new UserMailer();
     $mailer->send($to, $from, $subject, $body);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:23,代码来源:StorySubmission_body.php


示例11: execute

 public function execute()
 {
     $fb = $this->getMain()->getVal('feedback');
     $user = $this->getUser();
     $subject = "用户bug反馈";
     $body = json_decode($fb);
     if ($user != '') {
         if ($body->note != '') {
             $trueSubject = $user->getName() . ":" . $body->note;
         } else {
             $trueSubject = $user->getName() . ":" . $body->note;
         }
     } else {
         if ($body->note != '') {
             $trueSubject = $body->note;
         } else {
             $trueSubject = $subject;
         }
     }
     $fs = wfGetFS(FS_OSS);
     $time = microtime();
     $id = HuijiFunctions::getTradeNo('FB');
     $fs->put("Feedback/{$id}.html", $body->html);
     $data = str_replace('data:image/png;base64,', '', $body->img);
     $data = str_replace(' ', '+', $data);
     $data = base64_decode($data);
     $source_img = imagecreatefromstring($data);
     imagepng($source_img, "/tmp/{$id}.png", 3);
     $fs->put("Feedback/{$id}.png", file_get_contents("/tmp/{$id}.png"));
     imagedestroy($source_img);
     $trueBody = $this->getSection('Issue');
     $trueBody .= $body->note;
     $trueBody .= $this->getSection('Cookie');
     foreach ($_COOKIE as $key => $value) {
         $trueBody .= $key . ":" . $value . ";" . PHP_EOL;
     }
     $trueBody .= $this->getSection('URL');
     $trueBody .= $body->url;
     $trueBody .= $this->getSection('源代码');
     $trueBody .= "http://fs.huijiwiki.com/Feedback/{$id}.html";
     $trueBody .= $this->getSection('Agent');
     foreach ($body->browser as $key => $value) {
         if (is_array($value)) {
             $trueBody .= $key . ":" . implode(", ", $value) . ";" . PHP_EOL;
         } else {
             $trueBody .= $key . ":" . $value . ";" . PHP_EOL;
         }
     }
     $trueBody .= $this->getSection('来源');
     $trueBody .= $body->referer;
     $trueBody .= $this->getSection('分辨率');
     $trueBody .= $body->w . "X" . $body->h;
     $trueBody .= $this->getSection('截图');
     $trueBody .= "http://fs.huijiwiki.com/Feedback/{$id}.png";
     $res = UserMailer::send(new MailAddress('[email protected]', 'trello', 'trello'), new MailAddress("[email protected]"), $trueSubject, $trueBody);
     $this->getResult()->addValue(null, $this->getModuleName(), $res);
 }
开发者ID:HuijiWiki,项目名称:HuijiMiddleware,代码行数:57,代码来源:FeedbackApi.php


示例12: sendEmail

function sendEmail() {
	$from    = new MailAddress("[email protected]");
	$to      = new MailAddress("[email protected]");
	$body    = "Test sendgrid email";
	$headers = array( "X-Msg-Category" => "Test" );
	$subject = "This is a sendgrid test";

	UserMailer::send($to, $from, $subject, $body);
}
开发者ID:schwarer2006,项目名称:wikia,代码行数:9,代码来源:sendEmail.php


示例13: sendMessage

 function sendMessage(\PageAttachment\User\User $user, $subject, $message)
 {
     global $wgNoReplyAddress;
     global $wgPasswordSender;
     $to = new \MailAddress($user->getEmailAddress());
     $from = new \MailAddress($wgPasswordSender);
     $replyTo = new \MailAddress($wgNoReplyAddress);
     \UserMailer::send($to, $from, $subject, $message, $replyTo);
 }
开发者ID:mediawiki-extensions,项目名称:mediawiki-page-attachment,代码行数:9,代码来源:EmailTransporter.php


示例14: check_existence_of_spamfile

function check_existence_of_spamfile($email)
{
    global $wgSitename, $wgCityId;
    $articles = getWikiArticles();
    if (!empty($articles)) {
        ob_start();
        echo $wgSitename, "\n";
        print_r($articles);
        $body = ob_get_clean();
        UserMailer::send(new MailAddress($email), new MailAddress($email), 'Spam list related pages in NS=8 on  ' . $wgSitename . ' - ' . $wgCityId, $body);
    }
}
开发者ID:Tjorriemorrie,项目名称:app,代码行数:12,代码来源:blackListMessageChecks.php


示例15: notifyUser

 /**
  * Notifies a single user of the changes made to properties in a single edit.
  *
  * @since 0.1
  *
  * @param SWLGroup $group
  * @param User $user
  * @param SWLChangeSet $changeSet
  * @param boolean $describeChanges
  *
  * @return Status
  */
 public static function notifyUser(SWLGroup $group, User $user, SWLChangeSet $changeSet, $describeChanges)
 {
     global $wgLang, $wgPasswordSender, $wgPasswordSenderName;
     $emailText = wfMsgExt('swl-email-propschanged-long', 'parse', $GLOBALS['wgSitename'], $changeSet->getEdit()->getUser()->getName(), SpecialPage::getTitleFor('SemanticWatchlist')->getFullURL(), $wgLang->time($changeSet->getEdit()->getTime()), $wgLang->date($changeSet->getEdit()->getTime()));
     if ($describeChanges) {
         $emailText .= '<h3> ' . wfMsgExt('swl-email-changes', 'parse', $changeSet->getEdit()->getTitle()->getFullText(), $changeSet->getEdit()->getTitle()->getFullURL()) . ' </h3>';
         $emailText .= self::getChangeListHTML($changeSet, $group);
     }
     $title = wfMsgReal('swl-email-propschanged', array($changeSet->getEdit()->getTitle()->getFullText()), true, $user->getOption('language'));
     wfRunHooks('SWLBeforeEmailNotify', array($group, $user, $changeSet, $describeChanges, &$title, &$emailText));
     return UserMailer::send(new MailAddress($user), new MailAddress($wgPasswordSender, $wgPasswordSenderName), $title, $emailText, null, 'text/html; charset=ISO-8859-1');
 }
开发者ID:nischayn22,项目名称:mediawiki-extensions-SemanticWatchlist,代码行数:24,代码来源:SWL_Emailer.php


示例16: sendNotification

 private function sendNotification()
 {
     global $wgFlowerUrl;
     $subject = "ImageReview deletion failed #{$this->taskId}";
     $body = "{$wgFlowerUrl}/task/{$this->taskId}";
     $recipients = [new \MailAddress('[email protected]'), new \MailAddress('[email protected]'), new \MailAddress('[email protected]')];
     $from = $recipients[0];
     foreach ($recipients as $recipient) {
         \UserMailer::send($recipient, $from, $subject, $body);
     }
     WikiaLogger::instance()->error("ImageReviewLog", ['method' => __METHOD__, 'message' => "Task #{$this->taskId} deleting images did not succeed. Please check.", 'taskId' => $this->taskId, 'taskUrl' => $body]);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:12,代码来源:ImageReviewTask.class.php


示例17: sendComeBackMail

function sendComeBackMail($user, $batch)
{
    $body = wfMsg('Come-on-back-email' . $batch, $wgServer, $user->getName(), $wgServer . '/' . preg_replace('/ /', '-', $user->getTalkPage()), $user->getName());
    $from = new MailAddress("[email protected]");
    $to = new MailAddress($user->getEmail());
    $content_type = "text/html; charset={$wgOutputEncoding}";
    $subject = "Can you help out with a few things on wikiHow?";
    if ($batch == 3) {
        $subject = "Can you try out wikiHow’s new and improved Quality Guardian tool?";
    }
    UserMailer::send($to, $from, $subject, $body, false, $content_type);
}
开发者ID:biribogos,项目名称:wikihow-src,代码行数:12,代码来源:find_editors_to_notify.php


示例18: register

 /**
  * Зарегистрировать нового пользователя в системе
  * 
  * @param string $mail Почта
  * @param string $password Пароль
  * @param string $name Имя
  * @param string $surname Фамилия 
  * @param string $burthday Дата рождения
  * @param bool $gender Пол 
  * @param integer $ip IP
  * @throws UserException Если пользователь уже существует
  * @throws UserException Если неверна дата рождения
  * @throws UserException Не заполнены имя и фамилия
  * @throws UserException Неверный формат почты
  */
 public function register($mail, $password, $name, $surname, $burthday, $gender, $ip)
 {
     if (checkMail($mail)) {
         if ($this->checkIfExsist($mail)) {
             throw new UserException($mail, UserException::USR_ALREADY_EXIST);
         }
         if (!checkDateFormat($burthday)) {
             throw new UserException($mail, UserException::USR_CHECK_BURTHDAY);
         } else {
             if ($name == "" && $surname == "") {
                 throw new UserException($mail, UserException::USR_NAME_EMPTY);
             }
         }
         $textPassword = $password;
         $password = md5($password);
         $date = date("Y-m-d");
         $query = "\r\n                INSERT INTO `SITE_USERS` SET\r\n                    `mail`='{$mail}',\r\n                    `password`='{$password}',\r\n                    `ip`={$ip},\r\n                    `register_date`='{$date}',\r\n                    `name`='{$name}',\r\n                    `second_name`='{$surname}',\r\n                    `gender`={$gender},\r\n                    `burthday`='{$burthday}'\r\n                ";
         $this->_sql->query($query);
         $querySelectId = $this->_sql->selFieldsWhere("SITE_USERS", "`mail`='{$mail}'", "id");
         $arr = $this->_sql->GetRows($querySelectId);
         $id = $arr[0]["id"];
         $activationKey = $this->generateActivationKey(7);
         $insertActivationRowData = array($id, $activationKey);
         $this->_sql->insert("USERS_ACTIVATION_KEYS", $insertActivationRowData);
         $p = new UserMailer();
         $p->mail = $mail;
         $embeddedImages = array("photos/no-photo.jpg", "photos/no-galary.jpg");
         $s = new SmartyExst();
         $s->assign("NAME", "{$name} {$surname}");
         $s->assign("PASS", $textPassword);
         $s->assign("ID", $id);
         $s->assign("KEY", $activationKey);
         $sendString = $s->fetch($this->mailTemplate);
         $p->registerSend($sendString, $embeddedImages);
         return $id;
     } else {
         throw new UserException($mail, UserException::USR_NAME_INCORRECT);
     }
 }
开发者ID:EntityFX,项目名称:QuikiJAR,代码行数:54,代码来源:UserRegister.php


示例19: execute

 /**
  * The main method, creates
  */
 public function execute()
 {
     foreach ($this->recipients as $recipient) {
         echo "Sending to: {$recipient}... ";
         $to = new MailAddress($recipient);
         $sent = UserMailer::send($to, $this->from, $this->subject, $this->body, $this->replyTo, null);
         if ($sent) {
             echo "done!\n";
         } else {
             echo "failed!\n";
         }
     }
     return null;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:17,代码来源:AdHocMailing.php


示例20: sendCode

 /**
  *
  * @param User $userFrom User creating the code
  * @param string $to Email address to send to
  * @param string $message The user message, to send along the code
  * @param mixed $language The language to translate generic message
  * @return boolean True = ok, false = error while sending
  */
 public function sendCode($userFrom, $to, $message, $language)
 {
     $to = new MailAddress($to);
     $from = new MailAddress($userFrom);
     $userFromName = $userFrom->getName();
     $subject = wfMessage('wpm-invitation-subj', $userFromName)->inLanguage($language)->text();
     $body = wfMessage('wpm-invitation-body', $userFromName, $message, $this->wpi_code, 'wpi-' . $this->getCategory()->getDescription())->inLanguage($language)->text();
     $body .= wfMessage('wp-mail-footer')->inLanguage($language)->text();
     try {
         UserMailer::send($to, $from, $subject, $body);
     } catch (Exception $e) {
         wfDebugLog('wikiplaces', 'WpInvitation::sendCode: ERROR SENDING EMAIL from ' . $from . '", to ' . $to . ', code ' . $this->wpi_code);
         return false;
     }
     return true;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:24,代码来源:WpInvitation.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP UserManager类代码示例发布时间:2022-05-23
下一篇:
PHP UserListFactory类代码示例发布时间: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