本文整理汇总了PHP中GWF_User::getValidMail方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_User::getValidMail方法的具体用法?PHP GWF_User::getValidMail怎么用?PHP GWF_User::getValidMail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_User
的用法示例。
在下文中一共展示了GWF_User::getValidMail方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onMailTicketB
private function onMailTicketB(GWF_HelpdeskTicket $ticket, GWF_HelpdeskMsg $message, GWF_User $user)
{
if ('' === ($rec = $user->getValidMail())) {
return;
}
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($rec);
$mail->setSubject($this->module->langUser($user, 'subj_nt', array($ticket->getID())));
$href_work = Common::getAbsoluteURL($this->module->getMethodURL('AssignWork', '&ticket=' . $ticket->getID() . '&worker=' . $user->getID() . '&token=' . $ticket->getHashcode()), false);
$mail->setBody($this->module->langUser($user, 'body_nt', array($user->displayUsername(), $ticket->getCreator()->displayUsername(), $ticket->displayTitle($user), $message->displayMessage(), $href_work)));
return $mail->sendToUser($user);
}
示例2: sendMail
private function sendMail(GWF_User $user)
{
if ('' === ($email = $user->getValidMail())) {
return $this->module->error('err_no_mail');
}
$sender = $this->module->getMailSender();
$username = $user->displayUsername();
$link = $this->getRequestLink($user);
$body = $this->module->lang('mail_body', array($username, $sender, $link));
$mail = new GWF_Mail();
$mail->setSender(GWF_SUPPORT_EMAIL);
$mail->setReceiver($email);
$mail->setSubject($this->module->lang('mail_subj'));
$mail->setBody($body);
return $mail->sendToUser($user) ? $this->module->message('msg_sent_mail', array('<em>' . GWF_HTML::display(GWF_HTML::lang('unknown')) . '</em>')) : GWF_HTML::err('ERR_MAIL_SENT');
}
示例3: onEMailModerationB
private function onEMailModerationB($user, GWF_Shoutbox $entry, GWF_User $staff)
{
if ('' === ($rec = $staff->getValidMail())) {
return;
}
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($rec);
$mail->setSubject($this->module->langUser($staff, 'emod_subj'));
$id = $entry->getID();
$token = $entry->getHashcode();
$deletion_url = Common::getAbsoluteURL("index.php?mo=Shoutbox&me=Moderate&shoutid={$id}&token={$token}");
$deletion_link = GWF_HTML::anchor($deletion_url, $deletion_url);
$message = $entry->display('shout_message');
$username = $user === false ? GWF_HTML::lang('guest') : $user->display('user_name');
$mail->setBody($this->module->langUser($staff, 'emod_body', array($username, $message, $deletion_link)));
return $mail->sendToUser($staff);
}
示例4: onSendAlertMail
private function onSendAlertMail(GWF_User $user)
{
if ('' === ($to = $user->getValidMail())) {
return;
}
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($to);
$mail->setSubject($this->module->langUser($user, 'alert_subj'));
$mail->setBody($this->module->langUser($user, 'alert_body', array($user->displayUsername(), $_SERVER['REMOTE_ADDR'])));
return $mail->sendToUser($user);
}
示例5: onSendC
private function onSendC($email, $message, GWF_User $user)
{
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($user->getValidMail());
$mail->setReply($email);
$mail->setSubject($this->module->langUser($user, 'mail_subj'));
$mail->setBody($this->module->langUser($user, 'mail_body', array($email, $message)));
return $mail->sendToUser($user);
}
示例6: sendModMailB
private function sendModMailB(GWF_Download $dl, GWF_User $uploader, GWF_User $staff)
{
if ('' === ($rec = $staff->getValidMail())) {
return;
}
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($rec);
$mail->setSubject($this->module->langUser($staff, 'mod_mail_subj'));
$token = $dl->getHashcode();
$dlid = $dl->getID();
$url1 = "index.php?mo=Download&me=Moderate&token={$token}&dlid={$dlid}&action=download";
$url2 = "index.php?mo=Download&me=Moderate&token={$token}&dlid={$dlid}&action=allow";
$url3 = "index.php?mo=Download&me=Moderate&token={$token}&dlid={$dlid}&action=delete";
$args = array($staff->displayUsername(), $uploader->displayUsername(), $dl->display('dl_filename'), $dl->display('dl_realname'), $dl->display('dl_mime'), $dl->getFilesize(), $dl->display('dl_descr'), Common::getAbsoluteURL($url1, true), Common::getAbsoluteURL($url2, true), Common::getAbsoluteURL($url3, true));
$mail->setBody($this->module->langUser($staff, 'mod_mail_body', $args));
$mail->sendToUser($staff);
}
示例7: sendMailDone
private static function sendMailDone(Module_Audit $module, GWF_User $user, GWF_AuditLog $log)
{
if ('' === ($email = $user->getValidMail())) {
// echo GWF_HTML::err('ERR_GENERAL', array(__FILE__, __LINE__));
return false;
}
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($email);
$mail->setSubject(self::getMailSubjDone($module, $user, $log));
$mail->setBody(self::getMailBodyDone($module, $user, $log));
return $mail->sendToUser($user);
}
示例8: sendAlertMail
public static function sendAlertMail(Module_Account $module, GWF_User $user, $record_alert = 'record_alert')
{
if ($receive_mail = $user->getValidMail()) {
$module->onLoadLanguage();
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$sig = $module->lang("mail_signature");
$mail->setSenderName($sig);
$mail->setReceiver($receive_mail);
$mail->setSubject($module->lang("mails_{$record_alert}"));
$url = Common::getAbsoluteURL($module->getMethodURL('Access'));
$mail->setBody($module->lang("mailb_record_alert", array($user->displayUsername(), $module->lang("mailv_{$record_alert}"), GWF_HTML::display($_SERVER['HTTP_USER_AGENT']), $_SERVER['REMOTE_ADDR'], gethostbyaddr($_SERVER['REMOTE_ADDR']), GWF_HTML::anchor($url, $url, 'Manage IP recording'), $sig)));
$mail->sendToUser($user);
}
}
示例9: sendSubscriptionB
private static function sendSubscriptionB(Module_Forum $module, GWF_ForumThread $thread, GWF_User $user, $postername, $msg_block, $msg_count, $boardText, $threadTitle, $sender)
{
$userid = $user->getID();
$username = $user->displayUsername();
if (false === ($receiver = $user->getValidMail())) {
GWF_Log::logCron('[ERROR] User ' . $username . ' has no valid email.');
return false;
}
if (false === ($options = GWF_ForumOptions::getUserOptions($user))) {
GWF_Log::logCron('[ERROR] User ' . $username . ' has no valid forum options.');
}
$token = $options->getVar('fopt_token');
$href = Common::getAbsoluteURL($thread->getLastPageHREF(false), false);
$showLink = GWF_HTML::anchor($href, $href);
$href = Common::getAbsoluteURL($thread->getExternalUnSubscribeHREF($userid, $token, true), false);
$unsubLink = GWF_HTML::anchor($href, $href);
$href = Common::getAbsoluteURL($thread->getExternalUnSubscribeAllHREF($userid, $token, true), false);
$unsubLinkAll = GWF_HTML::anchor($href, $href);
$mail = new GWF_Mail();
$mail->setSender($sender);
$mail->setReceiver($receiver);
$mail->setSubject($module->langUser($user, 'submail_subj', array($threadTitle, $postername, $boardText)));
$mail->setBody($module->langUser($user, 'submail_body', array($username, $msg_count, $boardText, $threadTitle, $msg_block, $showLink, $unsubLink, $unsubLinkAll)));
if (false === $mail->sendToUser($user)) {
GWF_Log::logCron('[ERROR] Can not send mail to ' . $username . '; EMail: ' . $receiver);
} else {
GWF_Log::logCron('[+] Successfully sent Email to ' . $username . '; EMail: ' . $receiver);
}
}
示例10: sendGPGMail
private function sendGPGMail(GWF_User $user, $fingerprint)
{
if ('' === ($email = $user->getValidMail())) {
return $this->module->error('err_no_mail');
}
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($email);
$mail->setGPGKey($fingerprint);
$mail->setSubject($this->module->langUser($user, 'mails_gpg'));
$mail->setBody($this->getGPGMailBody($user, $fingerprint));
if (false === $mail->sendToUser($user)) {
return GWF_HTML::err('ERR_MAIL_SENT');
}
return $this->module->message('msg_mail_sent');
}
示例11: onSendCommentedMailB
private function onSendCommentedMailB($user, GWF_Comment $comment, GWF_User $admin)
{
if ('' === ($rec = $admin->getValidMail())) {
return;
}
$username = $user === false ? $_POST['username'] : $user->getVar('user_name');
$username = htmlspecialchars($username);
$www = htmlspecialchars(Common::getPostString('www', ''));
$email = htmlspecialchars(Common::getPostString('email', ''));
$href_delete = Common::getAbsoluteURL('index.php?mo=Comments&me=Moderate&delete=' . $comment->getID() . '&ctoken=' . $comment->getHashcode());
$args = array($admin->displayUsername(), $username, $email, $www, $comment->display('cmt_message'), $href_delete);
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($rec);
$mail->setSubject($this->module->langUser($admin, 'subj_cmt'));
$mail->setBody($this->module->langUser($admin, 'body_cmt', $args));
$mail->sendToUser($admin);
}
示例12: sendReplyMailStaff
private function sendReplyMailStaff(GWF_HelpdeskTicket $ticket, GWF_HelpdeskMsg $message, GWF_User $user)
{
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($user->getValidMail());
$mail->setSubject($this->module->langUser($user, 'subj_nms', array($ticket->getID())));
$link_read = Common::getAbsoluteURL($this->module->getMethodURL('MarkRead', sprintf('&ticket=%s&message=%s&token=%s', $ticket->getID(), $message->getID(), $message->getHashcode())));
$mail->setBody($this->module->langUser($user, 'body_nms', array($user->displayUsername(), $ticket->getCreator()->displayUsername(), $message->displayMessage(), $link_read)));
$mail->sendToUser($user);
}