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


PHP mailer函数代码示例

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


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

示例1: userSignup

function userSignup($uname, $pswd, $email)
{
    $url = $GLOBALS['URL'];
    if (TRUE) {
        //filter_var($email,FILTER_VALIDATE_EMAIL)){
        $confcode = md5(uniqid(rand()));
        $data = array($confcode, $uname, $pswd, $email);
        $response = db("temp_signup", $data);
        if ($response === TRUE && mailer('confirm', array($confcode, $email))) {
            echo "A confirmation email has been sent to the given address!";
        } else {
            if ($response = 1062) {
                userSignup($data[1], $data[2], $data[3]);
            } else {
                echo "RESPONSE: {$response} \r\nMESSAGE: {$message} \r\nCONFCODE: {$confcode} \r\nURL: {$url}";
            }
        }
    } else {
        echo "Invalid Email {$email}";
    }
}
开发者ID:redeye229,项目名称:CharityChainProject,代码行数:21,代码来源:functions.php

示例2: mail_and_die

function mail_and_die($subject, $body)
{
    mailer('it@xinchejian.com', $subject, $body);
    die($subject . "\n" . $body);
}
开发者ID:xinchejian,项目名称:bouncer,代码行数:5,代码来源:mailer.php

示例3: trim

include_once G5_CAPTCHA_PATH . '/captcha.lib.php';
include_once G5_LIB_PATH . '/mailer.lib.php';
$mb_id = trim($_POST['mb_id']);
$mb_email = trim($_POST['mb_email']);
$sql = " select mb_name, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' and mb_email_certify <> '' ";
$mb = sql_fetch($sql);
if (!$mb) {
    alert("이미 메일인증 하신 회원입니다.", G5_URL);
}
if (!chk_captcha()) {
    alert('자동등록방지 숫자가 틀렸습니다.');
}
$sql = " select count(*) as cnt from {$g5['member_table']} where mb_id <> '{$mb_id}' and mb_email = '{$mb_email}' ";
$row = sql_fetch($sql);
if ($row['cnt']) {
    alert("{$mb_email} 메일은 이미 존재하는 메일주소 입니다.\\n\\n다른 메일주소를 입력해 주십시오.");
}
// 인증메일 발송
$subject = '[' . $config['cf_title'] . '] 인증확인 메일입니다.';
$mb_name = $mb['mb_name'];
$mb_datetime = $mb['mb_datetime'] ? $mb['mb_datetime'] : G5_TIME_YMDHIS;
$mb_md5 = md5($mb_id . $mb_email . $mb_datetime);
$certify_href = G5_BBS_URL . '/email_certify.php?mb_id=' . $mb_id . '&amp;mb_md5=' . $mb_md5;
ob_start();
include_once './register_form_update_mail3.php';
$content = ob_get_contents();
ob_end_clean();
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
$sql = " update {$g5['member_table']} set mb_email = '{$mb_email}' where mb_id = '{$mb_id}' ";
sql_query($sql);
alert("인증메일을 {$mb_email} 메일로 다시 보내 드렸습니다.\\n\\n잠시후 {$mb_email} 메일을 확인하여 주십시오.", G5_URL);
开发者ID:ariefbox,项目名称:gnuboard5,代码行数:31,代码来源:register_email_update.php

示例4: array_unique

    // 최고관리자에게 보내는 메일
    if ($config['cf_email_wr_super_admin']) {
        $array_email[] = $super_admin['mb_email'];
    }
    // 원글게시자에게 보내는 메일
    if ($config['cf_email_wr_write']) {
        if ($w == '') {
            $wr['wr_email'] = $wr_email;
        }
        $array_email[] = $wr['wr_email'];
    }
    // 옵션에 메일받기가 체크되어 있고, 게시자의 메일이 있다면
    if (strstr($wr['wr_option'], 'mail') && $wr['wr_email']) {
        $array_email[] = $wr['wr_email'];
    }
    // 중복된 메일 주소는 제거
    $unique_email = array_unique($array_email);
    $unique_email = array_values($unique_email);
    for ($i = 0; $i < count($unique_email); $i++) {
        mailer($wr_name, $wr_email, $unique_email[$i], $subject, $content, 1);
    }
}
// 사용자 코드 실행
@(include_once $board_skin_path . '/write_update.skin.php');
@(include_once $board_skin_path . '/write_update.tail.skin.php');
delete_cache_latest($bo_table);
if ($file_upload_msg) {
    alert($file_upload_msg, G5_HTTP_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id . '&amp;page=' . $page . $qstr);
} else {
    goto_url(G5_HTTP_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id . $qstr);
}
开发者ID:najinsu,项目名称:nsle,代码行数:31,代码来源:write_update.php

示例5: md5

        $mb_md5 = md5($mb_id . $email . $datetime);
        $content = $ma[ma_content];
        $content = preg_replace("/{이름}/", $name, $content);
        $content = preg_replace("/{별명}/", $nick, $content);
        $content = preg_replace("/{회원아이디}/", $mb_id, $content);
        $content = preg_replace("/{이메일}/", $email, $content);
        $content = preg_replace("/{생일}/", (int) substr($birth, 4, 2) . '월 ' . (int) substr($birth, 6, 2) . '일', $content);
        $content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='{$g4['url']}/{$g4['bbs']}/email_stop.php?mb_id={$mb_id}&mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
        /*
        ob_start();
        include "$mail_skin/mail.skin.php";
        $content = ob_get_contents();
        ob_end_clean();
        */
        //mailer($default[de_subject], $default[de_admin_email], $email, $subject, $content, 1);
        mailer($config[cf_title], $member[mb_email], $email, $subject, $content, 1);
        echo "<script> document.all.cont.innerHTML += '{$cnt}. {$email} ({$mb_id} : {$name})<br>'; </script>\n";
        //echo "+";
        flush();
        ob_flush();
        ob_end_flush();
        usleep($sleepsec);
        if ($cnt % $countgap == 0) {
            echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
        }
        // 화면을 지운다... 부하를 줄임
        if ($cnt % $maxscreen == 0) {
            echo "<script> document.all.cont.innerHTML = ''; document.body.scrollTop += 1000; </script>\n";
        }
    }
}
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:mail_select_update.php

示例6: sql_query

        $result = sql_query($sql);
        for ($i = 0; $row = sql_fetch_array($result); $i++) {
            $auth[$row['au_menu']] = $row['au_auth'];
        }
        if (!$i) {
            alert('최고관리자 또는 관리권한이 있는 회원만 접근 가능합니다.', G5_URL);
        }
    }
}
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
if (get_session('ss_mb_key') !== $admin_key) {
    session_destroy();
    include_once G5_LIB_PATH . '/mailer.lib.php';
    // 메일 알림
    mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'] . ' 아이피로 XSS 공격이 있었습니다.\\n\\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\\n\\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\\n\\n' . G5_URL, 0);
    alert_close('정상적으로 로그인하여 접근하시기 바랍니다.');
}
@ksort($auth);
// 가변 메뉴
unset($auth_menu);
unset($menu);
unset($amenu);
$tmp = dir(G5_ADMIN_PATH);
while ($entry = $tmp->read()) {
    if (!preg_match('/^admin.menu([0-9]{3}).*\\.php$/', $entry, $m)) {
        continue;
    }
    // 파일명이 menu 으로 시작하지 않으면 무시한다.
    $amenu[$m[1]] = $entry;
    include_once G5_ADMIN_PATH . '/' . $entry;
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:31,代码来源:admin.lib.php

示例7: iconv_euckr

                        $strURL = '';
                        $strData = iconv_euckr($sms_content);
                        $strDate = '';
                        $nCount = count($strDest);
                        $res = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
                        $SMS->Send();
                        $SMS->Init();
                        // 보관하고 있던 결과값을 지웁니다.
                    }
                } else {
                    include_once G5_LIB_PATH . '/icode.sms.lib.php';
                    $SMS = new SMS();
                    // SMS 연결
                    $SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
                    $SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv_euckr(stripslashes($sms_content)), "");
                    $SMS->Send();
                }
            }
        }
        // 답변 이메일전송
        if (trim($row['iq_email'])) {
            include_once G5_LIB_PATH . '/mailer.lib.php';
            $subject = $config['cf_title'] . ' ' . $row['it_name'] . ' 상품문의 답변 알림 메일';
            $content = conv_content($iq_answer, 1);
            mailer($config['cf_title'], $config['cf_admin_email'], $row['iq_email'], $subject, $content, 1);
        }
    }
    goto_url("./itemqaform.php?w={$w}&amp;iq_id={$iq_id}&amp;sca={$sca}&amp;{$qstr}");
} else {
    alert();
}
开发者ID:kwon0281m,项目名称:youngcart5,代码行数:31,代码来源:itemqaformupdate.php

示例8: if

			mysql_query($sql);
		
			//$_SESSION['loguserid'] = $lastid;
		
			$from = $varsline['adminemail'];
			$to = $email;
			$subj = "http://".$_SERVER['SERVER_NAME']." - registration";
			$body = "\n\nДля подтверждения регистрации перейдите по ссылке: http://".$_SERVER['SERVER_NAME']."/work.php?act=submitregistration&code=".$code;
		
			$_SESSION['register_result'] = 'submit';

			$_SESSION['sent'] = 1;
            $_SESSION['sent_title'] = "Спасибо за Вашу регистрацию!";
            $_SESSION['sent_text'] = "Чтобы подтвердить регистрацию, перейдите, пожалуйста, по ссылке в письме, которое уже отправлено на Ваш електронный ящик.";

			mailer($from,$to,$subj,$body);
			echo '<script> document.location.href="'.$_SERVER['HTTP_REFERER'].'?=register=1"; </script>';
			exit();
	    //}
	    //else
	    //{
		//	$_SESSION['register_result'] = 'badcode';

		//	echo '<script> document.location.href="/cabinet/subact/register"; </script>';
		//	exit();
	    //}
	}
	else if($act=="editprofile")
	{
	    if(!isset($_SESSION['loguserid']))
	    {
开发者ID:Apxe,项目名称:Rubin_final,代码行数:31,代码来源:work_cabinet.php

示例9: createReset

 /**
  * Reset user password (via email)
  *
  * @param string $email
  *
  * @return bool
  * @throws \phpmailerException
  */
 public static function createReset($email)
 {
     $user = User::findOne('email = :email', ['email' => $email]);
     if ($user !== false) {
         $token = zHash($email . rand(10000, 9999999) . time() . microtime());
         $user->reset_token = $token;
         $user->save();
         $email = mailer();
         $email->Subject = 'Password Reset Request';
         $email->Body = view('mail.password_reset', compact('token', 'user'));
         $email->isHTML();
         return $email->send();
     }
     return false;
 }
开发者ID:zigiphp,项目名称:zigiphp-2,代码行数:23,代码来源:Auth.php

示例10: RunNowReportInDB

function RunNowReportInDB($report_id = null, $report_arr = array())
{
    if (!$report_id && !count($report_arr)) {
        return;
    }
    global $pearDB, $oreon;
    $hosts = array();
    $reportinfo = array();
    $hosts = getHostReport($report_id);
    $reportinfo = getReportInfo($report_id);
    $services = getServiceGroupReport($report_id);
    $dates = getPeriodToReportFork($reportinfo['period']);
    $start_date = $dates[0];
    $end_date = $dates[1];
    $reportingTimePeriod = getreportingTimePeriod();
    if (isset($_SERVER['DOCUMENT_ROOT'])) {
        $nb_folders = count(explode("/", $_SERVER['DOCUMENT_ROOT']));
        $path_www = "/" . implode("/", array_fill(0, intval($nb_folders) - 1, '..'));
        //echo $_SERVER['DOCUMENT_ROOT'] . "  " . intval($nb_folders) -1 . "  " .  $path_www . "<br />";
    }
    if (isset($hosts) && count($hosts) > 0) {
        foreach ($hosts['report_hgs'] as $hgs_id) {
            $stats = array();
            $stats = getLogInDbForHostGroup($hgs_id, $start_date, $end_date, $reportingTimePeriod);
            $Allfiles[] = pdfGen($report_id, getMyHostGroupName($hgs_id), 'hgs', $start_date, $end_date, $stats, "", $reportinfo["report_title"], $path_www);
            // "/../.."
            //print_r($Allfiles);
        }
    }
    if (isset($services) && count($services) > 0) {
        foreach ($services['report_sg'] as $sg_id) {
            $sg_stats = array();
            $sg_stats = getLogInDbForServicesGroup($sg_id, $start_date, $end_date, $reportingTimePeriod);
            $Allfiles[] = pdfGen($report_id, getMyServiceGroupName($sg_id), 'sgs', $start_date, $end_date, $sg_stats, $l, $reportinfo["report_title"], $path_www);
        }
    }
    $emails = getReportContactEmail($report_id);
    $files = array();
    foreach ($Allfiles as $file) {
        $files[basename($file)]["url"] = $file;
    }
    mailer(getGeneralOptInfo("pdfreports_report_author"), getGeneralOptInfo("pdfreports_email_sender"), $emails, $reportinfo['subject'], $reportinfo['mail_body'], getGeneralOptInfo("pdfreports_smtp_server_address"), $files, $reportinfo['name']);
    $files = null;
    $Allfiles = null;
    $emails = null;
    $services = null;
    $hosts = null;
}
开发者ID:hagen3000,项目名称:centreon-pdf-reports,代码行数:48,代码来源:DB-Func.php

示例11: sql_query

        $result = sql_query($sql);
        for ($i = 0; $row = sql_fetch_array($result); $i++) {
            $auth[$row['au_menu']] = $row['au_auth'];
        }
        if (!$i) {
            alert("최고관리자 또는 관리권한이 있는 회원만 접근 가능합니다.", $g4['path']);
        }
    }
}
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
if (get_session("ss_mb_key") !== $admin_key) {
    session_destroy();
    include_once "{$g4['path']}/lib/mailer.lib.php";
    // 메일 알림
    mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], "XSS 공격 알림", "{$_SERVER['REMOTE_ADDR']} 아이피로 XSS 공격이 있었습니다.\n\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\n\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\n\n{$g4['url']}", 0);
    alert_close("정상적으로 로그인하여 접근하시기 바랍니다.");
}
@ksort($auth);
// 가변 메뉴
unset($auth_menu);
unset($menu);
unset($amenu);
$tmp = dir($g4['admin_path']);
while ($entry = $tmp->read()) {
    //if (!preg_match("/^admin.menu([0-9]{3}).php/", $entry, $m))
    //if (!preg_match("/^admin.menu([0-9]{3}).*\.php/", $entry, $m))
    if (!preg_match("/^admin.menu([0-9]{3}).*\\.php\$/", $entry, $m)) {
        continue;
    }
    // 파일명이 menu 으로 시작하지 않으면 무시한다.
开发者ID:ragi79,项目名称:g4dtd,代码行数:31,代码来源:admin.lib.php

示例12: mysql_query

                    $allsum += $line['price']*$item['count'];

            		$sql1 = "UPDATE $par->objectstable SET `added`=`added`+$item[count] WHERE id=$item[id]";
            		$res1 = mysql_query($sql1);
                
				    unset($_SESSION['basket'][$key]);
				}
        }
        $ordertext .= "Итого: $allsum";

        $currtime = time();

        $sql = "INSERT INTO $par->orderstable (`payment`, `delivery`, `date`, `name`, `email`, `phone`, `region`, `city`, `address`, `ordertext`, `allsum`, `userid`, `orderstr`,`orderstatus`) VALUES ('$payment', '$delivery', $currtime, '$name', '$email', '$phone', '$region', '$city', '$address', '$ordertext', $allsum, $userid, '$orderstr', 2)";
        mysql_query($sql);

        mailer($email, $varsline['adminemail'], 'Заказ',$bodytext.$ordertext);

        $_SESSION['sent'] = 1;
        $_SESSION['sent_title'] = "Спасибо, Ваш заказ успешно оформлен!";
        $_SESSION['sent_text'] = "Наж менеджер свяжется с Вами как можно скорее.";
        echo '
        <script>
                document.location.href=\'/basket\';
        </script>
        ';
        exit();
        
    }


开发者ID:Apxe,项目名称:Rubin_final,代码行数:28,代码来源:work_basket.php

示例13: die

<?
if(!$_SESSION['logged']){die();}
	$res=mysql_query("select * from invoices where id='".$_SESSION['invoice']."'")or die(mysql_error());
		$info=mysql_fetch_array($res);
	if(isset($_POST['sendinvoice'])){
		$to=$_POST['to'];
		if($to==''){
			echo "<div class='errormsg'>Please enter a valid Email</div>";
		}else{
			$subject=$_POST['subject'];
			$message=$_POST['message'];
			$_GET['id']=$_SESSION['invoice'];
			include "../inc/invoice_save.php";
			
			$invoiceloc=str_replace(array('inc','mobile/'),'',dirname(__FILE__))."inc/invoices/".$_SESSION['invoice'].".pdf";
			if(mailer($to,$subject,$message,$invoiceloc)){
				echo "<div class='successmsg'>Email has been Sent</div>";
			}else{
				echo "<div class='errormsg'>Oops! Something went wrong!</div>";
			}
		}	
}
		
?>
<table align='center' style=''>
	<tr>
		<td class='alldone' onclick="window.open('../inc/invoicepdf.php?id=<?php 
echo $_SESSION['invoice'];
?>
')"><img src='style/images/save_pdf.png' style='width:120px;'/><br>Download PDF</td>
		<td class='alldone' onclick="window.open('../inc/invoicehtml.php?id=<?php 
开发者ID:amitjoy,项目名称:other-php,代码行数:31,代码来源:step3.php

示例14: session_start

<?php

include '../database.php';
session_start();
error_reporting(E_ERROR | E_PARSE);
if (isset($_POST['signupEmail'])) {
    $email = mysqli_real_escape_string($link, $_POST['signupEmail']);
    $password = sha1(md5(mysqli_real_escape_string($link, $_POST['signupPassword'])));
    $confPassword = sha1(md5(mysqli_real_escape_string($link, $_POST['signupconfirmPassword'])));
    if ($confPassword != $password) {
        echo "Enter same password in both fields.";
    } else {
        $sql = "INSERT INTO db_user_info (email, password) VALUES ('{$email}', '{$password}')";
        $pwd = mysqli_query($link, $sql);
        if (mysqli_affected_rows($link)) {
            include '../function/mailer.php';
            $to = $email;
            $message = "Please verify your account by clicking on the given link. <a target='_blank' href='http://buildblockz.com/verifyaccount.php?email=" . $email . "&verifycode=" . $password . "'>Verify</a>";
            mailer($to, $message);
            echo 1;
        } else {
            echo "Email already exist.";
        }
    }
}
mysqli_close();
开发者ID:ravi0912,项目名称:bbz-initial-idea-prototype,代码行数:26,代码来源:userSignUp.php

示例15: mail

        $hdrs .= "Bcc: david.turgeon@wellsfargo.com\n";
    }
    $hdrs .= "Content-Type: text/html;\n charset=utf-8\n";
    return mail("{$arr['to']}", $sub, $msg, $hdrs);
}
if (sendable($_POST)) {
    $data = $_POST;
} else {
    if (sendable($_GET)) {
        $data = $_GET;
    } else {
        $data = '';
    }
}
if (sendable($data)) {
    $OK = $data && mailer($data);
}
$REZ = json_encode(array('stat' => $OK ? 'sent' : 'fail', 'refr' => "{$SERV['HTTP_REFERER']}"));
?>
<script>
            var W = window,
                R = <?php 
echo $REZ;
?>
,
                S = (R.stat === 'fail') ? 3 : 1;

            W.setTimeout(function () {
                if (S > 1) {
                    W.history.go(-1);
                } else {
开发者ID:wf-ecg,项目名称:smbiz-16q1,代码行数:31,代码来源:relay.php


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