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


PHP mymail函数代码示例

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


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

示例1: sendnewpassword

 function sendnewpassword($mail)
 {
     global $lang;
     $ExistMail = doquery("SELECT `email` FROM {{table}} WHERE `email` = '" . $mail . "' LIMIT 1;", 'users', true);
     if (empty($ExistMail['email'])) {
         message($lang['mail_not_exist'], "index.php?page=lostpassword", 2, false, false);
     } else {
         $Caracters = "aazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN1234567890";
         $Count = strlen($Caracters);
         $NewPass = "";
         $Taille = 6;
         srand((double) microtime() * 1000000);
         for ($i = 0; $i < $Taille; $i++) {
             $CaracterBoucle = rand(0, $Count - 1);
             $NewPass = $NewPass . substr($Caracters, $CaracterBoucle, 1);
         }
         $Title = $lang['mail_title'];
         $Body = "Hallo ShadoX,\n\n";
         $Body .= "dein Passwort für " . $game_config['game_name'] . " lautet:\n\n";
         $Body .= $NewPass . "\n\n";
         $Body .= "Du kannst dich damit unter " . REGURL . " einloggen.\n\n";
         $Body .= "Wir verschicken Passwörter nur an die von dir im Spiel angegebenen Mailadressen. Solltest du diese Mail nicht angefordert haben kannst du sie also einfach ignorieren.\n\n";
         $Body .= "Wir wünschen dir weiterhin viel Erfolg beim Spielen von " . $game_config['game_name'] . "!\n\n";
         $Body .= "Dein " . $game_config['game_name'] . "-Team\n\n";
         mymail($mail, $Title, $Body, ADMINEMAIL);
         $NewPassSql = md5($NewPass);
         $QryPassChange = "UPDATE {{table}} SET ";
         $QryPassChange .= "`password` ='" . $NewPassSql . "' ";
         $QryPassChange .= "WHERE `email`='" . $mail . "' LIMIT 1;";
         doquery($QryPassChange, 'users');
     }
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:32,代码来源:index.php

示例2: sendemail

function sendemail($message, $address, $title)
{
    global $lang;
    $uni = $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
    $uni = ereg_replace("[^0-9]", "", $uni);
    $lang['mail_welcome'] = '<table width="100%" height="100%" bgcolor="Black" border="1">';
    $lang['mail_welcome'] .= '<tr valign="top">';
    $lang['mail_welcome'] .= '<td valign="top">';
    $lang['mail_welcome'] .= '<center>';
    $lang['mail_welcome'] .= '<img src="http://darkevo.org/images/header.jpg" alt="Censtudios Gaming Portal" /><br />';
    $lang['mail_welcome'] .= '<table width="80%" height="220"><tr><td valign="top">';
    $lang['mail_welcome'] .= '<font color="White"><br /><br />';
    $lang['mail_welcome'] .= $message;
    $lang['mail_welcome'] .= '</font>';
    $lang['mail_welcome'] .= '</td></tr></table>';
    $lang['mail_welcome'] .= '</center>';
    $lang['mail_welcome'] .= '</td>';
    $lang['mail_welcome'] .= '</tr>';
    $lang['mail_welcome'] .= '</table>';
    $parse['gameurl'] = GAMEURL;
    $parse['uni'] = $uni;
    $email = parsetemplate($lang['mail_welcome'], $parse);
    $status = mymail($address, $title, $email);
    return $status;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:25,代码来源:email.php

示例3: sendpassemail

function sendpassemail($emailaddress, $password)
{
    global $game_config, $lang;
    $email = parsetemplate($lang['reg_mail_text_part1'] . $password . $lang['reg_mail_text_part2'] . GAMEURL, $parse);
    $status = mymail($emailaddress, $lang['register_at'] . $game_config['game_name'], $email);
    return $status;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:7,代码来源:reg.php

示例4: sendpassemail

function sendpassemail($emailaddress, $password)
{
    global $lang;
    $parse['gameurl'] = GAMEURL;
    $email = parsetemplate($lang['mail_welcome'], $parse);
    $status = mymail($emailaddress, $lang['mail_title'], $email);
    return $status;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:8,代码来源:active.php

示例5: msg_send_simple_message

function msg_send_simple_message($owners, $sender, $timestamp, $message_type, $from, $subject, $text, $escaped = false, $force = false)
{
    global $config, $user, $sn_message_class_list;
    if (!$owners) {
        return;
    }
    $timestamp = $timestamp ? $timestamp : SN_TIME_NOW;
    $sender = intval($sender);
    if (!is_array($owners)) {
        $owners = array($owners);
    }
    if (!$escaped) {
        $from = db_escape($from);
        $subject = db_escape($subject);
        $text = db_escape($text);
    }
    $text_unescaped = stripslashes(str_replace(array('\\r\\n', "\r\n"), "<br />", $text));
    $message_class = $sn_message_class_list[$message_type];
    $message_class_email = $message_class['email'];
    $message_class_switchable = $message_class['switchable'];
    $message_class_name = $message_class['name'];
    $message_class_name_total = $sn_message_class_list[MSG_TYPE_NEW]['name'];
    if ($owners[0] == '*') {
        if ($user['authlevel'] < 3) {
            return false;
        }
        // TODO Добавить $timestamp - рассылка может быть и отсроченной
        // TODO Добавить $sender - рассылка может быть и от кого-то
        db_message_insert_all($message_type, $from, $subject, $text);
        $owners = array();
    } else {
        $insert_values = array();
        $insert_template = "('%u'," . str_replace('%', '%%', " '{$sender}', '{$timestamp}', '{$message_type}', '{$from}', '{$subject}', '{$text}')");
        foreach ($owners as $owner) {
            if ($user['id'] != $owner) {
                $owner_row = db_user_by_id($owner);
            } else {
                $owner_row = $user;
            }
            sys_user_options_unpack($owner_row);
            if ($force || !$message_class_switchable || $owner_row["opt_{$message_class_name}"]) {
                $insert_values[] = sprintf($insert_template, $owner);
            }
            if ($message_class_email && $config->game_email_pm && $owner_row["opt_email_{$message_class_name}"]) {
                @($result = mymail($owner_row['email'], $subject, $text_unescaped, '', true));
            }
        }
        if (empty($insert_values)) {
            return;
        }
        doquery($QryInsertMessage = 'INSERT INTO {{messages}} (`message_owner`, `message_sender`, `message_time`, `message_type`, `message_from`, `message_subject`, `message_text`) ' . 'VALUES ' . implode(',', $insert_values));
    }
    db_user_list_set_mass_mail($owners, "`{$message_class_name}` = `{$message_class_name}` + 1, `{$message_class_name_total}` = `{$message_class_name_total}` + 1");
    if (in_array($user['id'], $owners) || $owners[0] == '*') {
        $user[$message_class_name]++;
        $user[$message_class_name_total]++;
    }
}
开发者ID:divyinfo,项目名称:SuperNova,代码行数:58,代码来源:msg_send_simple_message.php

示例6: sendpassemail

function sendpassemail($emailaddress, $password, $username)
{
    global $lang, $Code;
    $parse['gameurl'] = GAMEURL;
    $parse['password'] = $password;
    $email = parsetemplate($lang['mail_welcome'], $parse);
    $status = mymail($emailaddress, $lang['mail_title'], $username, $password);
    return $status;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:9,代码来源:reg.php

示例7: msg_send_simple_message

function msg_send_simple_message($owners, $sender, $timestamp, $message_type, $from, $subject, $text, $escaped = false)
{
    global $config, $user, $sn_message_class_list, $time_now;
    $timestamp = $timestamp ? $timestamp : $time_now;
    $sender = intval($sender);
    if (!is_array($owners)) {
        $owners = array($owners);
    }
    if (!$escaped) {
        $from = mysql_real_escape_string($from);
        $subject = mysql_real_escape_string($subject);
        $text = mysql_real_escape_string($text);
    }
    $text_unescaped = stripslashes(str_replace(array('\\r\\n', "\r\n"), "<br />", $text));
    $message_class = $sn_message_class_list[$message_type];
    $message_class_email = $message_class['email'];
    $message_class_switchable = $message_class['switchable'];
    $message_class_name = $message_class['name'];
    $message_class_name_total = $sn_message_class_list[MSG_TYPE_NEW]['name'];
    $QryInsertMessage = 'INSERT INTO {{messages}} (`message_owner`, `message_sender`, `message_time`, `message_type`, `message_from`, `message_subject`, `message_text`) ';
    $QryUpdateUser = "UPDATE {{users}} SET `{$message_class_name}` = `{$message_class_name}` + 1, `{$message_class_name_total}` = `{$message_class_name_total}` + 1 ";
    if ($owners[0] == '*') {
        if ($user['authlevel'] < 3) {
            return false;
        }
        $QryInsertMessage .= "SELECT `id`, 0, unix_timestamp(now()), {$message_type}, '{$from}', '{$subject}', '{$text}' FROM {{users}}; ";
    } else {
        $insert_values = array();
        $insert_template = "('%u'," . str_replace('%', '%%', " '{$sender}', '{$timestamp}', '{$message_type}', '{$from}', '{$subject}', '{$text}')");
        foreach ($owners as $owner) {
            if ($user['id'] != $owner) {
                $owner_row = doquery("SELECT * FROM {{users}} WHERE id = {$owner} LIMIT 1;", '', true);
                sys_user_options_unpack($owner_row);
            } else {
                $owner_row =& $user;
            }
            if (!$message_class_switchable || $owner_row["opt_{$message_class_name}"]) {
                $insert_values[] = sprintf($insert_template, $owner);
            }
            if ($message_class_email && $config->game_email_pm && $owner_row["opt_email_{$message_class_name}"]) {
                @($result = mymail($owner_row['email'], $subject, $text_unescaped, '', true));
            }
        }
        if (empty($insert_values)) {
            return;
        }
        $QryInsertMessage .= 'VALUES ' . implode(',', $insert_values) . ';';
        $QryUpdateUser .= 'WHERE `id` IN (' . implode(',', $owners) . ');';
    }
    doquery($QryInsertMessage);
    doquery($QryUpdateUser);
    if (in_array($user['id'], $owners) || $owners[0] == '*') {
        $user[$message_class_name]++;
        $user[$message_class_name_total]++;
    }
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:56,代码来源:msg_send_simple_message.php

示例8: sendpassemail

function sendpassemail($emailaddress, $password)
{
    $gamename = "Ugamela";
    $staff = "The Rout Team ";
    $email = ADMINEMAIL;
    $gameurl = GAMEURL;
    $email = "Tu o alguien se registro en {$gamename} ({$gameurl}).\r\n\r\nLa siguiente contrase&ntilde;a se te envia para poder ingresar en el juego.\r\n\r\nTu nueva contrase&ntilde;a es: {$password}\r\n\r\nGracias por jugar, {$staff}.\r\n{$gameurl}";
    $status = mymail($emailaddress, "Registro en {$gamename}", $email);
    return $status;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:10,代码来源:reg.php

示例9: sendpassemail

function sendpassemail($emailaddress, $password)
{
    global $lang;
    //Cojemos la variable $lang
    $parse['gameurl'] = GAMEURL;
    $parse['password'] = $password;
    $email = parsetemplate($lang['mail_welcome'], $parse);
    $status = mymail($emailaddress, $lang['mail_title'], $email);
    return $status;
    //Devolvemos status
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:11,代码来源:reg.php

示例10: sendpassemail

function sendpassemail($emailaddress, $password, $UserName)
{
    global $lang, $kod;
    $parse['gameurl'] = GAMEURL;
    $parse['password'] = $password;
    $parse['character'] = $UserName;
    $parse['kod'] = $kod;
    $email = parsetemplate($lang['mail_welcome'], $parse);
    $status = mymail($emailaddress, $lang['mail_title'], $email);
    return $status;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:11,代码来源:reg.php

示例11: sendpassemail

function sendpassemail($emailaddress, $password, $username)
{
    global $lang;
    $uni = $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
    $uni = ereg_replace("[^0-9]", "", $uni);
    $parse['gameurl'] = GAMEURL;
    $parse['password'] = $password;
    $parse['username'] = $username;
    $parse['uni'] = $uni;
    $email = parsetemplate($lang['mail_welcome'], $parse);
    $status = mymail($emailaddress, $lang['mail_title'], $email);
    return $status;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:13,代码来源:fbreg.php

示例12: sendpassemail

function sendpassemail($emailaddress, $password, $username, $code)
{
    global $lang, $game_config;
    $parse = $lang;
    $parse['password'] = $password;
    $parse['username'] = $username;
    $parse['uni'] = UNIVERSE;
    $parse['game'] = $game_config['game_name'];
    $parse['GAMEURL'] = GAMEURL;
    $parse['ADMIN_NAME'] = ADMIN_NAME;
    $parse['validate_url'] = GAMEURL . '/login.php?GET_LOGIN=1&username=' . $username . '&password=' . sha($password) . '&UNI=' . UNIVERSE . '&go=./?page=validate--code=' . $code;
    $status = mymail($emailaddress, $lang['mail_title'] . $parse['game'], parsetemplate(gettemplate('emails/reg'), $parse));
    return $status;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:14,代码来源:reg.php

示例13: mymail_attach

function mymail_attach($to, $subject, $body, $attach, $attachdata)
{
    if (!count($attach) && !count($attachdata)) {
        return mymail($to, $subject, $body);
    }
    require_once "Mail/mime.php";
    $json = json_decode(file_get_contents("/home/abhishek/Desktop/GenApp/abhishektest/appconfig.json"));
    $headers = array('From' => 'abhishektest@' . $json->mail->from, 'To' => $to, 'Subject' => $subject);
    $mime = new Mail_mime(array('eol' => "\n"));
    $mime->setTXTBody($body);
    if (count($attachdata)) {
        ob_start();
        foreach ($attach as $f) {
            if (!$mime->addAttachment($f, 'text/plain')) {
                $mime->addAttachment("could not attach {$f}", 'text/plain', "error-{$f}", false);
            }
        }
        ob_end_clean();
    }
    if (count($attachdata)) {
        ob_start();
        foreach ($attachdata as $d) {
            if (isset($d['data']) && isset($d['name'])) {
                if (!$mime->addAttachment($d['data'], 'text/plain', $d['name'], false)) {
                    $mime->addAttachment("could not attach data", 'text/plain', $d['name'], false);
                }
            } else {
                $mime->addAttachment("data data or name not set", 'text/plain', "unknown", false);
            }
        }
        ob_end_clean();
    }
    $body = $mime->get();
    $headers = $mime->headers($headers);
    if (isset($json->mail->smtp)) {
        $smtp = Mail::factory('smtp', array('host' => $json->mail->smtp->host, 'auth' => true, 'username' => $json->mail->smtp->user, 'password' => rtrim(base64_decode($json->mail->smtp->password))));
        $mail = $smtp->send($to, $headers, $body);
        return PEAR::isError($mail);
    }
    $phpmail = Mail::factory('mail');
    $mail = $phpmail->send($to, $headers, $body);
    return PEAR::isError($mail);
}
开发者ID:aditi-srivastava,项目名称:GenApp,代码行数:43,代码来源:mail.php

示例14: sendregmail

function sendregmail($emailaddress, $vercode)
{
    $controlrow = getcontrol();
    $verurl = $controlrow["gameurl"] . "?do=verify";
    $email = <<<END
You or someone using your email address recently signed up for an account on the {$controlrow["gamename"]} server, located at {$controlrow["gameurl"]}.

This email is sent to verify your registration email. In order to begin using your account, you must verify your email address.
Please visit the Verification Page ({$verurl}) and enter the code below to activate your account.
Verification code: {$vercode}

If you were not the person who signed up for the game, please disregard this message. You will not be emailed again.
END;
    $status = mymail($emailaddress, $controlrow["gamename"] . " Account Verification", $email);
    return $status;
}
开发者ID:Choptec,项目名称:dragon-knight,代码行数:16,代码来源:users.php

示例15: sendregmail

function sendregmail($emailaddress, $vercode)
{
    $controlquery = doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control");
    $controlrow = mysql_fetch_array($controlquery);
    extract($controlrow);
    $verurl = $gameurl . "?do=verify";
    $email = <<<END
You or someone using your email address recently signed up for an account on the {$gamename} server, located at {$gameurl}.

This email is sent to verify your registration email. In order to begin using your account, you must verify your email address. 
Please visit the Verification Page ({$verurl}) and enter the code below to activate your account.
Verification code: {$vercode}

If you were not the person who signed up for the game, please disregard this message. You will not be emailed again.
END;
    $status = mymail($emailaddress, "{$gamename} Account Verification", $email);
    return $status;
}
开发者ID:arveo,项目名称:NarutoBrowserMmorpg,代码行数:18,代码来源:users+-+Cópia.php


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