當前位置: 首頁>>代碼示例>>PHP>>正文


PHP email::sendMail方法代碼示例

本文整理匯總了PHP中email::sendMail方法的典型用法代碼示例。如果您正苦於以下問題:PHP email::sendMail方法的具體用法?PHP email::sendMail怎麽用?PHP email::sendMail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在email的用法示例。


在下文中一共展示了email::sendMail方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Database

<?php

session_start();
require_once "../../classes/database.class.php";
require_once "../../classes/mail.class.php";
$con = new Database();
if ($_SESSION['uname'] != 'admin') {
    header("Location:/views/loginwrong.html");
}
$query = "INSERT INTO Accounts VALUES('%s','%s','%s','%s','%s','')";
for ($i = 0; $i < 10; $i++) {
    if (strlen($_POST["uname{$i}"]) == 0) {
        break;
    }
    $passwd = substr(sha1(rand(1, 10000)), 0, 8);
    $con->query(sprintf($query, mysql_escape_string($_POST["uname{$i}"]), mysql_escape_string($_POST["name{$i}"]), sha1($passwd), mysql_escape_string($_POST["project{$i}"]), mysql_escape_string($_POST["email{$i}"])));
    $user = new email(1, $_POST["uname{$i}"], $passwd);
    $user->sendMail($_POST["email{$i}"]);
    $project = $_POST["project{$i}"];
    mkdir("/var/www/repos/{$project}/", 0777);
    mkdir("/var/www/repos/{$project}/{$project}/", 0777);
    chdir("/var/www/repos/{$project}/");
    exec("git init");
}
header("location:/admin/views/adminHome.php");
開發者ID:rajeevs1992,項目名稱:ProjectManagementSystem,代碼行數:25,代碼來源:newUsers.php

示例2: Database

<?php

session_start();
require_once "../classes/database.class.php";
require_once "../classes/mail.class.php";
$con = new Database();
if ($_GET['flag'] == 'branch') {
    $mail = new email(2);
    $reply = $con->query("SELECT email FROM Accounts WHERE projectName='{$_SESSION['projectName']}' AND projectName!=uname");
    if ($reply != 0) {
        while ($row = mysql_fetch_assoc($reply)) {
            $mail->sendMail($row['email']);
        }
    }
    header("location:/views/guide.php");
}
開發者ID:rajeevs1992,項目名稱:ProjectManagementSystem,代碼行數:16,代碼來源:mail.php

示例3: resendVerification

 function resendVerification()
 {
     $verificationlink = substr(md5($ar['username'] . $ar['email']), 1, 25);
     $sql = "update `users` set activation='" . $verificationlink . "' where userid='" . $_SESSION['vibes_userid'] . "'";
     $this->query($sql);
     $str = $objcommon->getTemplateFormat('emailverification');
     $objconfig = new config();
     $objuser = new user();
     $to['name'] = $_SESSION['vibes_username'];
     $to['email'] = $objuser->getUserEmailFromUserId($_SESSION['vibes_userid']);
     $from['name'] = $objcommon->getConfigValue('email_verification_from_name');
     $from['email'] = $objcommon->getConfigValue('email_verification_from_email');
     $subject = $objcommon->getConfigValue('email_verification_subject');
     $identifier['sitename'] = $objcommon->getConfigValue('sitename');
     $identifier['link'] = '<a href="' . $objconfig->get_domain_path() . 'emailverification.php?linkid=' . $verificationlink . '">' . $objconfig->get_domain_path() . 'emailverification.php?linkid=' . $activationlink . '</a>';
     $objemail = new email();
     $objemail->sendMail($to, $from, $subject, $body, $identifier);
     return true;
     //echo $identifier['link'];
     //					exit();
 }
開發者ID:sknlim,項目名稱:classified-2,代碼行數:21,代碼來源:user.class.php


注:本文中的email::sendMail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。