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


PHP Mail::check_validity方法代码示例

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


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

示例1: set_recipients

 function set_recipients($recipients)
 {
     $this->recipients = '';
     $recipients_list = explode(';', $recipients);
     $recipients_list = array_map('trim', $recipients_list);
     foreach ($recipients_list as $recipient) {
         if (Mail::check_validity($recipient)) {
             $this->recipients[] = $recipient;
         }
     }
     if (!empty($this->recipients)) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:16,代码来源:mail.class.php

示例2: load_module_lang

<?php

require_once '../admin/admin_begin.php';
load_module_lang('newsletter');
define('TITLE', $LANG['newsletter']);
require_once '../admin/admin_header.php';
$Template->set_filenames(array('admin_newsletter' => 'newsletter/admin_newsletter.tpl'));
$Cache->load('newsletter');
$sender_mail = stripslashes(retrieve(POST, 'sender_mail', '', TSTRING_UNCHANGE));
$newsletter_name = stripslashes(retrieve(POST, 'newsletter_name', ''));
$Template->assign_block_vars('config', array());
if (!empty($sender_mail) && !empty($newsletter_name)) {
    import('io/mail');
    if (Mail::check_validity($sender_mail)) {
        $Sql->query_inject("UPDATE " . DB_TABLE_CONFIGS . " SET value = '" . addslashes(serialize(array('sender_mail' => $sender_mail, 'newsletter_name' => $newsletter_name))) . "' WHERE name = 'newsletter'", __LINE__, __FILE__);
        $Cache->Generate_module_file('newsletter');
        $_NEWSLETTER_CONFIG['sender_mail'] = $sender_mail;
        $_NEWSLETTER_CONFIG['newsletter_name'] = $newsletter_name;
    } else {
        $Errorh->handler($LANG['newsletter_email_address_is_not_valid'], E_USER_WARNING);
    }
}
$Template->assign_vars(array('L_NEWSLETTER' => $LANG['newsletter'], 'L_SEND_NEWSLETTER' => $LANG['send_newsletter'], 'L_CONFIG_NEWSLETTER' => $LANG['newsletter_config'], 'L_USER_LIST' => $LANG['newsletter_member_list'], 'L_SENDER_MAIL' => $LANG['newsletter_sender_mail'], 'L_NEWSLETTER_NAME' => $LANG['newsletter_name'], 'SENDER_MAIL' => $_NEWSLETTER_CONFIG['sender_mail'], 'NEWSLETTER_NAME' => $_NEWSLETTER_CONFIG['newsletter_name'], 'L_SUBMIT' => $LANG['submit'], 'L_RESET' => $LANG['reset']));
$Template->pparse('admin_newsletter');
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:25,代码来源:admin_newsletter_config.php

示例3: check_admin_account

 function check_admin_account($login, $password, $password_repeat, $user_mail)
 {
     global $LANG;
     if (empty($login)) {
         return $LANG['admin_require_login'];
     } elseif (strlen($login) < 3) {
         return $LANG['admin_login_too_short'];
     } elseif (empty($password)) {
         return $LANG['admin_require_password'];
     } elseif (empty($password_repeat)) {
         return $LANG['admin_require_password_repeat'];
     } elseif (strlen($password) < 6) {
         return $LANG['admin_password_too_short'];
     } elseif (empty($user_mail)) {
         return $LANG['admin_require_mail'];
     } elseif ($password != $password_repeat) {
         return $LANG['admin_passwords_error'];
     } elseif (!Mail::check_validity($user_mail)) {
         return $LANG['admin_email_error'];
     } else {
         return '';
     }
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:23,代码来源:install.php

示例4: check_mail

function check_mail($mail)
{
    import('io/mail');
    return Mail::check_validity($mail);
}
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:5,代码来源:functions.inc.php

示例5: retrieve

<?php

require_once '../kernel/begin.php';
require_once '../newsletter/newsletter_begin.php';
require_once '../kernel/header.php';
$mail_newsletter = retrieve(POST, 'mail_newsletter', '');
$subscribe = retrieve(POST, 'subscribe', 'subscribe');
$id = retrieve(GET, 'id', 0);
$Template->set_filenames(array('newsletter' => 'newsletter/newsletter.tpl'));
if (!empty($mail_newsletter)) {
    import('io/mail');
    if (Mail::check_validity($mail_newsletter)) {
        $subscribe = $subscribe == 'subscribe' ? 1 : 0;
        if ($subscribe === 1) {
            $check_mail = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "newsletter WHERE mail = '" . $mail_newsletter . "'", __LINE__, __FILE__);
            if ($check_mail == 0) {
                $Sql->query_inject("INSERT INTO " . PREFIX . "newsletter (mail) VALUES ('" . $mail_newsletter . "')", __LINE__, __FILE__);
                $Errorh->handler($LANG['newsletter_add_success'], E_USER_NOTICE);
            } else {
                $Errorh->handler($LANG['newsletter_add_failure'], E_USER_WARNING);
            }
        } else {
            $check_mail = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "newsletter WHERE mail = '" . $mail_newsletter . "'", __LINE__, __FILE__);
            if ($check_mail >= 1) {
                $Sql->query_inject("DELETE FROM " . PREFIX . "newsletter WHERE mail = '" . $mail_newsletter . "'", __LINE__, __FILE__);
                $Errorh->handler($LANG['newsletter_del_success'], E_USER_NOTICE);
            } else {
                $Errorh->handler($LANG['newsletter_del_failure'], E_USER_WARNING);
            }
        }
    } else {
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:newsletter.php


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