本文整理汇总了PHP中mail::create_inet_mail方法的典型用法代码示例。如果您正苦于以下问题:PHP mail::create_inet_mail方法的具体用法?PHP mail::create_inet_mail怎么用?PHP mail::create_inet_mail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mail
的用法示例。
在下文中一共展示了mail::create_inet_mail方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SendOnlineMail
function SendOnlineMail()
{
global $db, $func, $__POST, $auth;
include_once "modules/mail/class_mail.php";
$mail = new mail();
if ($_POST['toUserID'] == -1) {
$_SESSION['tmpmsgbody'] = $_POST['msgbody'];
$_SESSION['tmpmsgsubject'] = $_POST['Subject'];
$func->information(t("Bitte gib einen Empfänger für deine Mail an"), "index.php?mod=mail&action=" . $_GET['action'] . "&step=2&replyto=" . $_GET['replyto'] . "&back=1");
// To additional recipients from cfg
} elseif (substr($_POST['toUserID'], 1, 7) == '-mail-') {
$to = substr($_POST['toUserID'], 8, strlen($_POST['toUserID']));
$mail->create_inet_mail('', $to, $__POST['Subject'], $__POST['msgbody'], $_POST['SenderMail']);
$func->confirmation('Die Mail wurde and ' . $to . ' versendet', '');
unset($_SESSION['tmpmsgbody']);
unset($_SESSION['tmpmsgsubject']);
// System-Mail: Insert will be done, by MF
} elseif ($auth['userid'] and $_POST['type'] == 0) {
// Send Info-Mail to receiver
if ($cfg['sys_internet']) {
$row = $db->qry_first('SELECT u.username, u.email, u.lsmail_alert FROM %prefix%user AS u WHERE u.userid = %int%', $_POST['toUserID']);
if ($row['lsmail_alert']) {
$mail->create_inet_mail($row['username'], $row['email'], t('Benachrichtigung: Neue LS-Mail'), t('Du hast eine neue Lansuite-Mail erhalten. Diese Benachrichtigung kannst du im System unter "Meine Einstellungen" deaktivieren'));
}
}
return true;
// Inet-Mail
} else {
$row = $db->qry_first("SELECT name, firstname, email FROM %prefix%user WHERE userid = %int%", $_POST['toUserID']);
if ($auth['userid']) {
$row2 = $db->qry_first("SELECT email FROM %prefix%user WHERE userid = %int%", $auth['userid']);
$_POST['SenderMail'] = $row2['email'];
}
$mail->create_inet_mail($row['firstname'] . ' ' . $row['name'], $row['email'], $__POST['Subject'], $__POST['msgbody'], $_POST['SenderMail']);
$func->confirmation('Die Mail wurde versendet', '');
unset($_SESSION['tmpmsgbody']);
unset($_SESSION['tmpmsgsubject']);
return false;
}
}
示例2: SetNotPaid
function SetNotPaid($userid, $partyid)
{
global $db, $cfg, $func, $auth, $seat2, $usrmgr;
include_once "modules/mail/class_mail.php";
$mail = new mail();
$Messages = array('success' => '', 'error' => '');
$db->qry('UPDATE %prefix%party_user SET paid = 0, paiddate = "" WHERE user_id = %int% AND party_id = %int% LIMIT 1', $userid, $partyid);
$row = $db->qry_first('SELECT username, email from %prefix%user WHERE userid = %int%', $userid);
$row2 = $db->qry_first('SELECT name FROM %prefix%partys WHERE party_id = %int%', $partyid);
$msgtext = $cfg['signon_not_paid_email_text'];
$msgtext = str_replace('%USERNAME%', $row['username'], $msgtext);
$msgtext = str_replace('%PARTYNAME%', $row2['name'], $msgtext);
if ($cfg['signon_send_paid_email'] == 1 or $cfg['signon_send_paid_email'] == 3) {
$mail->create_sys_mail($userid, $cfg['signon_paid_email_subject'], $msgtext) ? $Messages['success'] .= $row['username'] . ' (System-Mail)' . HTML_NEWLINE : ($Messages['error'] .= $row['username'] . ' (System-Mail)' . HTML_NEWLINE);
}
if ($cfg['signon_send_paid_email'] == 2 or $cfg['signon_send_paid_email'] == 3) {
$mail->create_inet_mail($row['username'], $row['email'], $cfg['signon_paid_email_subject'], $msgtext) ? $Messages['success'] .= $row['username'] . ' (Internet-Mail)' . HTML_NEWLINE : ($Messages['error'] .= $row['username'] . ' (Internet-Mail)' . HTML_NEWLINE);
}
// Switch seat back to "marked"
$seat2->MarkSeatIfNotPaidAndSeatReserved($userid);
$usrmgr->WriteXMLStatFile();
$func->log_event(t('Benutzer "%1" wurde für die Party "%2" auf "nicht bezahlt" gesetzt', $row['username'], $row2['name']), 1, '', 'Zahlstatus');
return $Messages;
}
示例3: masterform
$func->information(t('Du bist nicht berechtigt das Passwort dieses Clans zu ändern'), "index.php?mod=home");
} else {
include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
if ($auth['type'] < 2) {
$mf->AddField(t('Dezeitiges Passwort'), 'old_password', IS_PASSWORD, '', FIELD_OPTIONAL, 'CheckClanPW');
}
$mf->AddField(t('Neues Passwort'), 'password', IS_NEW_PASSWORD);
if ($mf->SendForm('index.php?mod=clanmgr&action=clanmgr&step=10', 'clan', 'clanid', $_GET['clanid'])) {
include_once "modules/mail/class_mail.php";
$mail = new mail();
// Send information mail to all clan members
$clanuser = $db->qry("SELECT userid, username, email FROM %prefix%user WHERE clanid=%int%", $_GET['clanid']);
while ($data = $db->fetch_array($clanuser)) {
$mail->create_mail($auth['userid'], $data['userid'], t('Clanpasswort geändert'), t('Das Clanpasswort wurde durch den Benutzer %1 in "%2" geändert', array($auth['username'], $_POST['password_original'])));
$mail->create_inet_mail($data['username'], $data['email'], t('Clanpasswort geändert'), t('Das Clanpasswort wurde durch den Benutzer %1 in "%2" geändert', array($auth['username'], $_POST['password_original'])), $cfg["sys_party_mail"]);
}
$func->log_event(t('Das Clanpasswort wurde durch den Benutzer %1 geändert', $auth['username']), 1, t('clanmgr'));
}
}
break;
// Delete
// Delete
case 20:
if ($auth['type'] >= 3) {
if ($_GET['clanid']) {
$_POST['action'][$_GET['clanid']] = 1;
}
if ($_POST['action']) {
foreach ($_POST['action'] as $key => $val) {
$db->qry("DELETE FROM %prefix%clan WHERE clanid = %string%", $key);
示例4: chr
case 2:
// Email prüfen, Freischaltecode generieren, Email senden
$user_data = $db->qry_first("SELECT username FROM %prefix%user WHERE email = %string%", $_POST['pwr_mail']);
if ($user_data['username'] == "LS_SYSTEM") {
$func->information(t('Für den System-Account darf kein neues Passwort generiert werden'), "index.php?mod=usrmgr&action=pwrecover&step=1");
} else {
if ($user_data['username']) {
$fcode = '';
for ($x = 0; $x <= 24; $x++) {
$fcode .= chr(mt_rand(65, 90));
}
$db->qry("UPDATE %prefix%user SET fcode='{$fcode}' WHERE email = %string%", $_POST['pwr_mail']);
$path = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "index.php"));
include_once "modules/mail/class_mail.php";
$mail = new mail();
$mail->create_inet_mail($user_data['username'], $_POST['pwr_mail'], $cfg['usrmgr_pwrecovery_subject'], str_replace("%USERNAME%", $user_data['username'], str_replace("%PATH%", "http://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}{$path}index.php?mod=usrmgr&action=pwrecover&step=3&fcode={$fcode}", $cfg['usrmgr_pwrecovery_text'])));
$func->confirmation(t('Dir wurde nun eine Freischalte-URL an die angegebene Emailadresse gesendet. Mit dem Aufruf dieser URL wird dir neues Passwort generiert werden.'), "index.php");
} else {
$func->information(t('Die von dir eigegebene Email existiert nicht in der Datenbank'), "index.php?mod=usrmgr&action=pwrecover&step=1");
}
}
break;
case 3:
// Freischaltecode prüfen, Passwort generieren, Freischaltcode zurücksetzen
$user_data = $db->qry_first("SELECT fcode FROM %prefix%user WHERE fcode = %string%", $_GET['fcode']);
if ($user_data['fcode'] && $_GET['fcode'] != '') {
$new_pwd = "";
for ($x = 0; $x <= 8; $x++) {
$new_pwd .= chr(mt_rand(65, 90));
}
$db->qry("UPDATE %prefix%user SET password = %string%, fcode = '' WHERE fcode = %string%", md5($new_pwd), $_GET['fcode']);
示例5: t
$text = str_replace("%CLAN%", $user["clan"], $text);
$text = str_replace("%CLANURL%", $user["clanurl"], $text);
$text = str_replace("%PARTYNAME%", $party_data["name"], $text);
$text = str_replace('%PARTYURL%', $cfg['sys_partyurl'], $text);
$text = str_replace("%MAXGUESTS%", $party_data['max_guest'], $text);
$text = str_replace("%WWCLID%", $user["wwclid"], $text);
$text = str_replace("%WWCLCLANID%", $user["wwclclanid"], $text);
$text = str_replace("%NGLID%", $user["nglid"], $text);
$text = str_replace("%NGLCLANID%", $user["nglclanid"], $text);
$text = str_replace("%IP%", $user["ip"], $text);
$user["paid"] ? $text = str_replace("%BEZAHLT%", t('Ja'), $text) : ($text = str_replace("%BEZAHLT%", t('Nein'), $text));
$user["checkin"] ? $text = str_replace("%EINGECHECKT%", t('Ja'), $text) : ($text = str_replace("%EINGECHECKT%", t('Nein'), $text));
$user["party_id"] ? $text = str_replace("%ANGEMELDET%", t('Ja'), $text) : ($text = str_replace("%ANGEMELDET%", t('Nein'), $text));
// Mail senden
if ($_POST["toinet"]) {
if ($mail->create_inet_mail($user["firstname"] . " " . $user["name"], $user["email"], $_POST["subject"], $text, $cfg["sys_party_mail"])) {
$success .= $user["firstname"] . " " . $user["name"] . "[" . $user["email"] . "]" . HTML_NEWLINE;
} else {
$fail .= $user["firstname"] . " " . $user["name"] . "[" . $user["email"] . "]" . HTML_NEWLINE;
}
}
if ($_POST["tosys"]) {
$mail->create_sys_mail($user["userid"], $__POST["subject"], $text);
}
}
$db->free_result($users);
if ($_POST["toinet"]) {
$inet_success = t('Die Mail wurde erfolgreich an folgende Benutzer gesendet:') . HTML_NEWLINE . $success . HTML_NEWLINE . HTML_NEWLINE . t('An folgende Benutzer konnte die Mail leider nicht gesendet werden:') . HTML_NEWLINE . $fail . HTML_NEWLINE . HTML_NEWLINE;
}
if ($_POST["tosys"]) {
$sys_success = t('Die Nachrichten an die System-Mailbox wurden erfolgreich versandt');
示例6: Mastercomment
function Mastercomment($mod, $id, $update_table = array())
{
global $framework, $dsp, $auth, $db, $func, $cfg;
#echo '<ul class="Line">';
$dsp->AddFieldsetStart(t('Kommentare'));
// Delete comments
if ($_GET['mc_step'] == 10) {
include_once 'inc/classes/class_masterdelete.php';
$md = new masterdelete();
$md->LogID = $id;
$md->Delete('comments', 'commentid', $_GET['commentid']);
unset($_GET['commentid']);
}
$CurentURLBase = $framework->get_clean_url_query('base');
$CurentURLBase = str_replace('&mc_step=10', '', $CurentURLBase);
$CurentURLBase = str_replace('&mf_step=2', '', $CurentURLBase);
$CurentURLBase = preg_replace('#&mf_id=[0-9]*#si', '', $CurentURLBase);
$CurentURLBase = preg_replace('#&commentid=[0-9]*#si', '', $CurentURLBase);
// No Order by in this MS, for it collidates with possible other MS on this page
$order_by_tmp = $_GET['order_by'];
$_GET['order_by'] = '';
// List current comments
include_once 'modules/mastersearch2/class_mastersearch2.php';
$ms2 = new mastersearch2('bugtracker');
$ms2->query['from'] = "%prefix%comments AS c\n LEFT JOIN %prefix%user AS u ON c.creatorid = u.userid\n ";
$ms2->query['where'] = "c.relatedto_item = '{$mod}' AND c.relatedto_id = '{$id}'";
$ms2->config['dont_link_first_line'] = 1;
$ms2->AddSelect('UNIX_TIMESTAMP(c.date) AS date');
$ms2->AddSelect('c.creatorid');
$ms2->AddSelect('u.avatar_path');
$ms2->AddSelect('u.signature');
$ms2->AddSelect('u.userid');
$ms2->AddResultField('', 'u.username', 'FetchDataRow', '', 180);
$ms2->AddResultField('', 'c.text', 'FetchPostRow');
$ms2->AddIconField('quote', 'javascript:document.getElementById(\'text\').value += \'[quote]\' + document.getElementById(\'post%id%\').innerHTML + \'[/quote]\'', t('Zitieren'));
$ms2->AddIconField('edit', $CurentURLBase . '&commentid=%id%#dsp_form2', t('Editieren'), 'EditAllowed');
if ($auth['type'] >= 3) {
$ms2->AddIconField('delete', $CurentURLBase . '&mc_step=10&commentid=', t('Löschen'));
}
$ms2->PrintSearch($CurentURLBase, 'c.commentid');
$_GET['order_by'] = $order_by_tmp;
// Add new comments
if ($cfg['mc_only_logged_in'] and !$auth['login']) {
$func->information(t('Bitte loggen dich ein, bevor du einen Kommentar verfasst'), NO_LINK);
} else {
if ($_GET['commentid']) {
$row = $db->qry_first("SELECT creatorid FROM %prefix%comments WHERE commentid = %int%", $_GET['commentid']);
}
if (!$_GET['commentid'] or $row['creatorid'] and $row['creatorid'] == $auth['userid'] or $auth['type'] >= 2) {
include_once 'inc/classes/class_masterform.php';
$mf = new masterform();
$mf->LogID = $id;
$mf->AddField(t('Kommentar'), 'text', '', LSCODE_BIG);
if (!$auth['login']) {
$mf->AddField('', 'captcha', IS_CAPTCHA);
}
$mf->AddFix('relatedto_item', $mod);
$mf->AddFix('relatedto_id', $id);
if (!$_GET['commentid']) {
$mf->AddFix('date', 'NOW()');
}
if (!$_GET['commentid']) {
$mf->AddFix('creatorid', $auth['userid']);
}
if ($mf->SendForm('', 'comments', 'commentid', $_GET['commentid'])) {
// Send email-notifications to thread-subscribers
$path = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "index.php"));
include_once "modules/mail/class_mail.php";
$mail = new mail();
if (!$_GET['fid']) {
$_GET['fid'] = $thread['fid'];
}
// Internet-Mail
$subscribers = $db->qry('SELECT b.userid, u.firstname, u.name, u.email FROM %prefix%comments_bookmark AS b
LEFT JOIN %prefix%user AS u ON b.userid = u.userid
WHERE b.email = 1 AND b.relatedto_item = %string% AND b.relatedto_id = %int%', $mod, $id);
while ($subscriber = $db->fetch_array($subscribers)) {
if ($subscriber['userid'] != $auth['userid']) {
$mail->create_inet_mail($subscriber["firstname"] . " " . $subscriber["name"], $subscriber["email"], t('Es gibt einen neuen Kommentar'), str_replace('%URL%', $_SERVER['HTTP_REFERER'], t('Es wurde ein neuer Kommentar in einem Lansuite-Modul geschrieben: %URL%')), $cfg["sys_party_mail"]);
}
}
$db->free_result($subscribers);
// Sys-Mail
$subscribers = $db->qry('SELECT userid FROM %prefix%comments_bookmark AS b
WHERE b.sysemail = 1 AND b.relatedto_item = %string% AND b.relatedto_id = %int%', $mod, $id);
while ($subscriber = $db->fetch_array($subscribers)) {
if ($subscriber['userid'] != $auth['userid']) {
$mail->create_sys_mail($subscriber["userid"], t('Es gibt einen neuen Kommentar'), str_replace('%URL%', $_SERVER['HTTP_REFERER'], t('Es wurde ein neuer Kommentar in einem Lansuite-Modul geschrieben: %URL%')));
}
}
$db->free_result($subscribers);
// Update LastChange in $update_table, if $update_table is set
if ($update_table) {
list($key, $val) = each($update_table);
$db->qry('UPDATE %prefix%' . $key . ' SET changedate=NOW() WHERE ' . $val . ' = %int%', $id);
}
}
} else {
$func->error(t('Du bist nicht berechtigt, diesen Kommentar zu editieren'));
}
//.........这里部分代码省略.........
示例7: substr
$tid = $db->insert_id();
// Assign just created post to this new thread
$db->qry("UPDATE %prefix%board_posts SET tid = %int% WHERE pid = %int%", $tid, $pid);
}
// Send email-notifications to thread-subscribers
$path = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "index.php"));
include_once "modules/mail/class_mail.php";
$mail = new mail();
if (!$_GET['fid']) {
$_GET['fid'] = $thread['fid'];
}
// Internet-Mail
$subscribers = $db->qry("SELECT b.userid, u.firstname, u.name, u.email FROM %prefix%board_bookmark AS b\n \t\tLEFT JOIN %prefix%user AS u ON b.userid = u.userid\n \t\tWHERE b.email = 1 and (b.tid = %int% or b.fid = %int%)\n \t\t", $tid, $_GET['fid']);
while ($subscriber = $db->fetch_array($subscribers)) {
if ($subscriber['userid'] != $auth['userid']) {
$mail->create_inet_mail($subscriber["firstname"] . " " . $subscriber["name"], $subscriber["email"], $cfg["board_subscribe_subject"], str_replace("%URL%", "http://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}{$path}index.php?mod=board&action=thread&tid={$tid}", $cfg["board_subscribe_text"]), $cfg["sys_party_mail"]);
}
}
$db->free_result($subscribers);
// Sys-Mail
$subscribers = $db->qry("SELECT userid FROM %prefix%board_bookmark AS b\n WHERE b.sysemail = 1 and (b.tid = %int% or b.fid = %int%)\n ", $tid, $_GET['fid']);
while ($subscriber = $db->fetch_array($subscribers)) {
if ($subscriber['userid'] != $auth['userid']) {
$mail->create_sys_mail($subscriber["userid"], $cfg["board_subscribe_subject"], str_replace("%URL%", "http://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}{$path}index.php?mod=board&action=thread&tid={$tid}", $cfg["board_subscribe_text"]));
}
}
$db->free_result($subscribers);
}
$dsp->AddFieldsetEnd();
}
if ($thread['caption'] != '') {