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


PHP smtpmailer函数代码示例

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


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

示例1: sendAct

function sendAct($user)
{
    if ($user == 'rocky') {
        $email = "5738197368@email.uscc.net";
    } else {
        if ($user == 'admin') {
            $email = '7652377298@txt.att.net';
        } else {
            $email = '7652377298@txt.att.net';
        }
    }
    $str = random_string(8);
    smtpmailer($email, GUSER, 'RIMS System protection', "User " . $user . " is disabled", "You need to activate your account using the following code: [   " . $str . "   ]");
    return $str;
}
开发者ID:r1cebank,项目名称:Robot-Information-Management-System--Web-,代码行数:15,代码来源:sendSMS.php

示例2: tempPassword

 function tempPassword($conn, $email, &$errorMsg)
 {
     $errorMsg = "";
     try {
         //Generate a RANDOM MD5 Hash for a password
         $randomPassword = md5(uniqid(rand()));
         //Take the first 8 digits and use them as the temp password
         $newPassword = substr($randomPassword, 0, 8);
         //retrieve User info from DB
         $bd = $conn->prepare("CALL sp_getUserIdFromCredentials(?,?)");
         $bd->execute(array($this->username, $this->password));
         if ($db->rowCount() > 0) {
             $bd->bindColumn(1, $userID);
             $bd->fetch(PDO::FETCH_BOUND);
             //insert new password into DB
             $bd = $conn->prepare("CALL insertTempPassword(?,?)");
             $db->execute(array($email, $newPassword));
             //get return message
             if ($db->rowCount() > 0) {
                 $bd->bindColumn(1, $statusMsg);
                 $bd->fetch(PDO::FETCH_BOUND);
                 $errorMsg .= $statusMsg;
             }
             $success = true;
         } else {
             $errorMsg .= "Invalid username or password.";
         }
         if ($success == true) {
             define('GUSER', 'soustockmarketsimulation@gmail.com');
             // GMail username
             define('GPWD', '0xC0ff33');
             // GMail password
             //Email password
             $subject = "New Password";
             $message = "Your temporary password for SOUSMS is as follows:\n                    ---------------------------- \n                    Password: {$newPassword}\n                    ---------------------------- \n                    Please change this password when you login";
             if (!smtpmailer($email, GUSER, "SOU SMS", $subject, $message)) {
                 $errorMsg = "Sending Email Failed, Please Contact Site Admin! (soustockmarketsimulation@gmail.com)";
                 die($errorMsg);
             } else {
                 $errorMsg = 'New Password Sent!';
             }
         }
     } catch (PDOException $e) {
         $errorMsg .= "Error: " . $e->getMessage();
     }
     return $success;
 }
开发者ID:nordquip,项目名称:sousms,代码行数:47,代码来源:PasswordRecover.class.php

示例3: send_verification_mail

    function send_verification_mail($email, $hash)
    {
        $to = $email;
        // Send email to our user
        $subject = 'Signup | Verification';
        // Give the email a subject
        $message = '

        Thanks for signing up!
        Your account has been created,
        
        Please click this link to activate your account and set your password:
        http://localhost/news_app/users/verify?email=' . $email . '&hash=' . $hash . '
         
        ';
        // Our message above including the link
        return smtpmailer($to, $subject, $message);
    }
开发者ID:sonupatil,项目名称:news_app,代码行数:18,代码来源:email_helper.php

示例4: forgot_username

function forgot_username($con)
{
    if (isset($_POST['Submit'])) {
        $email = $_POST['email'];
        $check_email_exists = $con->prepare("SELECT username FROM user WHERE email = ?");
        $check_email_exists->bind_param("s", $email);
        $check_email_exists->execute();
        $check_email_exists->store_result();
        //$data = $check_email_exists->fetch_array();
        //$username = $data['username'];
        //$user_r = mysqli_stmt_get_result($check_email_exists);
        //$user = mysqli_fetch_array($user_r, MYSQLI_ASSOC);
        //$username = $user['username'];
        //$check_email_exists = mysqli_query($con, "SELECT username FROM user WHERE email = '$email' ");
        $username = utils::mysqli_result(mysqli_query($con, "SELECT username FROM user WHERE email = '{$email}'"), 0, 0);
        if ($check_email_exists->num_rows >= 1) {
            $mail = smtpmailer($email, "noreply@etm.com", "ETM Automated mail", "Eve Trade Master - login details", "You have recently requested your login details at www.evetrademaster.com. Your username is '{$username}'");
        } else {
            echo "Email not found in our records";
            echo "<meta http-equiv='refresh' content='2; url=../pages/forgot_username.php'>";
        }
    } else {
        echo "Forgot your username? Just type the e-mail associated to your account and we'll send it to you:" . "<br><br>";
        ?>
        <form method="POST" action="forgot_username.php" ><fieldset>
        <div class="form-group">
                <input class="form-control" type = "text" size="30" name="email">
                </div>
                <div class="form-group">
        
                    <p align='center'><input type ="Submit" name="Submit" value="Submit" class="btn btn-lg btn-success"></p>
            </fieldset></form>

<?php 
    }
}
开发者ID:marcfeather,项目名称:EveTradeMaster,代码行数:36,代码来源:forgot_username.php

示例5: date

<?php 
include "email.php";
$nome = $_POST["nome"];
$sobrenome = $_POST["sobrenome"];
$email = $_POST["email"];
$telefone = $_POST["telefone"];
$msg = $_POST["msg"];
$data_envio = date('d/m/Y');
setHeader();
?>

	<div class="body">	
        
<?php 
if (strlen($_POST['nome'])) {
    if (smtpmailer("contato@fernandoxavierfotografia.zz.mu", "Contato pelo formulario", $msg, $nome, $email, $telefone, $sobrenome, $data_envio)) {
        echo "Sua mensagem foi enviada com sucesso!";
    } else {
        echo "Ocorreu um erro ao enviar";
    }
    echo "<br><a href='http://fernandoxavierfotografia.zz.mu'>Voltar</a>";
}
?>
 
        
        

</div><!--body-->

<?php 
setFooter();
开发者ID:BrunoPastorello,项目名称:Sites,代码行数:31,代码来源:envia_email.php

示例6: sendInternalUserMessage

function sendInternalUserMessage($id, $subject, $message, $footer = "", $attachments = array(), $action = "")
{
    $from = "info@tclplanner.co.uk";
    $fromName = "Schokolat";
    $qry = "SELECT B.email, B.firstname, B.lastname FROM {$_SESSION['DB_PREFIX']}members B " . "WHERE B.member_id = " . getLoggedOnMemberID();
    $result = mysql_query($qry);
    //Check whether the query was successful or not
    if ($result) {
        while ($member = mysql_fetch_assoc($result)) {
            $from = $member['email'];
            $fromName = $member['firstname'] . " " . $member['lastname'];
        }
    }
    $qry = "SELECT B.email, B.firstname FROM {$_SESSION['DB_PREFIX']}members B " . "WHERE B.member_id = {$id} ";
    $result = mysql_query($qry);
    //Check whether the query was successful or not
    if ($result) {
        while ($member = mysql_fetch_assoc($result)) {
            smtpmailer($member['email'], $from, $fromName, $subject, getEmailHeader() . "<h4>Dear " . $member['firstname'] . ",</h4><p>" . $message . "</p>" . getEmailFooter() . $footer, $attachments);
            $subject = mysql_escape_string($subject);
            $message = mysql_escape_string($message);
            sendMessage($subject, $message, $id, $action);
        }
    } else {
        logError($qry . " - " . mysql_error());
    }
    if (!empty($error)) {
        echo $error;
    }
}
开发者ID:prodigyworks,项目名称:schokolat,代码行数:30,代码来源:system-db.php

示例7: Header

    // Debugar: 1 = erros e mensagens, 2 = mensagens apenas
    $mail->SMTPAuth = true;
    // Autenticação ativada
    $mail->SMTPSecure = 'tls';
    // SSL REQUERIDO pelo GMail
    $mail->Host = 'smtp.live.com';
    // SMTP utilizado
    $mail->Port = 587;
    // A porta 587 deverá estar aberta em seu servidor
    $mail->Username = GUSER;
    $mail->Password = GPWD;
    $mail->SetFrom($de, $de_nome);
    $mail->Subject = $assunto;
    $mail->Body = $corpo;
    $mail->AddAddress($para);
    if (!$mail->Send()) {
        $error = 'Mail error: ' . $mail->ErrorInfo;
        return false;
    } else {
        $error = 'Mensagem enviada!';
        return true;
    }
}
// Insira abaixo o email que irá receber a mensagem, o email que irá enviar (o mesmo da variável GUSER), o nome do email que envia a mensagem, o Assunto da mensagem e por último a variável com o corpo do email.
if (smtpmailer($Email, 'sliceoflifesite@hotmail.com', 'Contato - Slice of Life', 'Recuperacao de Senha', $Vai)) {
    Header("location:login.html");
    // Redireciona para uma página de obrigado.
}
if (!empty($error)) {
    echo $error;
}
开发者ID:Teawith,项目名称:maso4ada,代码行数:31,代码来源:esqueci.php

示例8: strtolower

require_once 'template/navigation.php';
if (isset($_POST['adduser']) && UserCan('create_user')) {
    $username = $_POST['firstname'] . $_POST['lastname'];
    $username = strtolower($username);
    $passwd = randomPassword();
    $addr = str_replace('users.php', '', $_SERVER['SCRIPT_NAME']);
    $body = "Hallo " . $_POST['firstname'] . " " . $_POST['lastname'] . ",\n";
    $body .= "Sie wurden als Nutzer hinzugefügt. \n";
    $body .= "Ihr Nutzername lautet: {$username}\n";
    $body .= "Ihr Passwort lautet: {$passwd}\n";
    $body .= "Bitte ändern Sie es bei nächster Möglichkeit.\n";
    $body .= "Die URL zum Tool lautet: " . $_SERVER['SERVER_ADDR'] . $addr;
    $passwd = hash('sha512', $passwd);
    $sql = "INSERT INTO `{$db_data}`.`users` (`userid` , `username`, `groupid` , `email` , `lastname` , `firstname` , `description`, `passwd`)\n    VALUES (NULL , '" . $username . "' , '" . $_POST['groupid'] . "' ,'" . $_POST['email'] . "', '" . $_POST['lastname'] . "', '" . $_POST['firstname'] . "' , '" . $_POST['description'] . "' , '" . $passwd . "')";
    if (mysqli_query($con, $sql)) {
        smtpmailer($_POST['email'], 'Du wurdest als Nutzer angelegt', $body);
    }
}
$result = mysqli_query($con, "SELECT * FROM users");
if (!UserCan('show_users')) {
    $error = "<div class=\"col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main\">";
    $error .= "<div class=\"alert alert-danger\" role=\"alert\">";
    $error .= "Fehler, Du hast nicht die benötigten Recht um Nutzer anzuzeigen.";
    $error .= "</div>";
    $error .= "</div>";
    die($error);
}
?>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    
<?php 
开发者ID:unbelauscht,项目名称:projectplanungbootstrap,代码行数:31,代码来源:users.php

示例9:

        // A porta 587 deverá estar aberta em seu servidor
        $mail->Username = $smtpUsuario;
        $mail->Password = $smtpSenha;
        $mail->SetFrom($from, $de_nome);
        $mail->Subject = $subject;
        $mail->Body = $corpo;
        $mail->AddAddress($para);
        if (!$mail->Send()) {
            $error = '<div class="sent">Mail error: ' . $mail->ErrorInfo . '</div>';
            return false;
        } else {
            $error = '<div class="sent">Enviado com sucesso!</div>';
            return true;
        }
    }
    if (smtpmailer($para, $from, $de_nome, $subject, $corpo)) {
        //sent
    }
    if (!empty($error)) {
        echo $error;
    }
}
?>

<!-- Formulário
--------------------------------- -->
<!DOCTYPE html>
<html lang="pt-br">
    <head>
        <meta charset="UTF-8">
	<meta name="author" content="André Silveira Machado" />
开发者ID:pedradanamente,项目名称:14.8.2,代码行数:31,代码来源:index.php

示例10: mysqli_real_escape_string

if (!empty($lang)) {
    include 'lang/' . $lang . '.php';
} else {
    include 'lang/' . $_COOKIE['lang'] . '.php';
}
if (isset($_POST['forgot'])) {
    $email = mysqli_real_escape_string($con, $_POST['email']);
    if (!($userid = getUserInfobyMail($email))) {
        die('Please check the email address you entered.');
    }
    $newpassword = randomPassword();
    $newencpasswd = hash('sha512', $newpassword);
    $sql = "UPDATE `users` SET `passwd` = '{$newencpasswd}' WHERE `users`.`userid` = '{$userid}';";
    if (mysqli_query($con, $sql)) {
        $body = $message['your_new_pass'] . ": " . $newpassword;
        smtpmailer($email, $message['your_new_pass'], $body);
    }
}
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
            <title>Passwort Reset</title>
            <!-- Bootstrap core CSS -->
        <link href="css/bootstrap.min.css" rel="stylesheet">
            <!-- Custom styles for this template -->
        <link href="css/signin.css" rel="stylesheet">
            <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
开发者ID:unbelauscht,项目名称:projectplanungbootstrap,代码行数:31,代码来源:forgot.php

示例11: mysql_insert_id

    $matchid = mysql_insert_id();
    if (!$result) {
        logError($qry . " - " . mysql_error());
    }
    for ($i = 0; $i < count($_POST['player']); $i++) {
        $playerid = $_POST['player'][$i];
        $qry = "INSERT INTO {$_SESSION['DB_PREFIX']}matchplayerdetails \n\t\t\t\t\t(\n\t\t\t\t\t\tmatchid, playerid, metacreateduserid, metamodifieduserid, \n\t\t\t\t\t\tmetacreateddate, metamodifieddate\n\t\t\t\t\t)\n\t\t\t\t\tVALUES\n\t\t\t\t\t(\n\t\t\t\t\t\t{$matchid}, {$playerid}, {$memberid}, {$memberid}, \n\t\t\t\t\t\tNOW(), NOW()\n\t\t\t\t\t)";
        $result = mysql_query($qry);
        if (!$result) {
            logError($qry . " - " . mysql_error());
        }
    }
    $details = "Match report attached for match on " . $_POST['matchdate'];
    $file = "uploads/matchcard{$id}" . session_id() . ".pdf";
    $report = new MatchCardReport('P', 'mm', 'A4', $matchid);
    $report->Output($file, "F");
    sendTeamMessage($teamid, "Match Report Confirmed", $details, "", array($file));
    sendRoleMessage("LEAGUE", "Match Report Confirmed", $details, "", array($file));
    if ($_POST['refereescore'] < 50 && $_POST['refereescore'] > 0) {
        $refname = GetRefereeName($refereeid);
        $refdetails = "Referee {$refname} has scored {$refereescore}<br><br>Report:<br>" . $_POST['refereeremarks'];
        smtpmailer(getSiteConfigData()->refereereportemail, "office@thefa.com", $_SESSION['SESS_TEAM_EMAIL'], "Referee Report", $refdetails);
    }
} catch (Exception $e) {
    logError("Signing image: " . $e->getMessage());
}
mysql_query("COMMIT");
header("location: matchconfirm.php?id={$matchid}");
?>
		
开发者ID:prodigyworks,项目名称:Coast-Guard,代码行数:29,代码来源:match3.php

示例12: forgot_password

function forgot_password($con)
{
    if (isset($_POST['Submit'])) {
        $user = strtolower(mysqli_real_escape_string($con, $_POST['username']));
        $email = strtolower(mysqli_real_escape_string($con, $_POST['email']));
        $check_email_user = mysqli_query($con, "SELECT password, salt FROM user WHERE username= '{$user}' AND email = '{$email}'") or die(mysqli_error($con));
        if (mysqli_num_rows($check_email_user) == 1) {
            $pw1 = get_random_string("abcdefghijklmnopqrstuwxyz1234567890_!#\$%&=", 7);
            //create new salt, generate crypt and store new PW and salt
            $cost = 10;
            $salt = strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.');
            $salt = sprintf("\$2a\$%02d\$", $cost) . $salt;
            $password_final = crypt($pw1, $salt);
            $mail = smtpmailer($email, "noreply@etm.com", "ETM Automated mail", "Eve Trade Master - login details", "You have recently requested a new password at www.evetrademaster.com. Your new password is '{$pw1}'");
            $update_pw_salt = mysqli_query($con, "UPDATE user SET password = '{$password_final}', salt = '{$salt}' WHERE username = '{$user}' ") or die(mysqli_error($con));
            if ($update_pw_salt) {
            } else {
                echo "Error establishing database connection. Try again later";
            }
        } else {
            echo "Data doesn't match our records";
        }
    } else {
        ?>
        Forgot your password? Type your email and username and we'll send you a new one.
        <form method="POST" action="forgot_password.php" ><fieldset>
        <div class="form-group">
                Email <input class="form-control" type = "text" size="30" name="email">
                </div>
                <div class="form-group">
        Username<input class="form-control" type = "text" size="20" name="username">
         </div>
                <p align='center'><input type ="Submit" name="Submit" value="Submit" class="btn btn-lg btn-success"></p>
            </fieldset></form>
<?php 
    }
}
开发者ID:marcfeather,项目名称:EveTradeMaster,代码行数:37,代码来源:forgot_password.php

示例13: sendFileUpdateMail

function sendFileUpdateMail($subject, $body)
{
    $to = ['krishnamoorthym@babajob.com'];
    $from = 'vinody@babajob.com';
    $from_name = 'VinodY';
    smtpmailer($to, $from, $from_name, $subject, $body, $is_gmail = true);
}
开发者ID:vinody-babajob,项目名称:kookoo_ivr,代码行数:7,代码来源:call.php

示例14: mysqli_real_escape_string

    $taskid = mysqli_real_escape_string($con, $_POST['taskid']);
    $projectid = getTaskInfobyID($taskid, 'projectid');
    $projectmanagermail = getUserInfo(getProjectInfoByID(getTaskInfobyID($taskid, 'projectid'), 'userid'), 'email');
    $projectmanagerid = getProjectInfoByID(getTaskInfobyID($taskid, 'projectid'), 'userid');
    $sql = "UPDATE `tasks` SET taskstatus = '" . $statusid . "', `lastchange`=CURRENT_TIMESTAMP WHERE taskid ='" . $taskid . "'";
    $history = "INSERT INTO `{$db_data}`.`statushistory` (`taskid`, `userid`, `statusid`, `timestamp`) VALUES ('" . $taskid . "', '" . $_SESSION['userid'] . "', '" . $statusid . "', CURRENT_TIMESTAMP);";
    mysqli_query($con, $history);
    if (mysqli_query($con, $sql)) {
        if (IsChild($taskid) && AllSubTasksDone($taskid) && $statusid == 3) {
            $updateparent = "UPDATE `tasks` SET taskstatus = '3' WHERE taskid ='" . getTaskInfobyID($taskid, 'parent') . "'";
            mysqli_query($con, $updateparent);
        } elseif (IsChild($taskid) && AllSubTasksDone($taskid) && $statusid != 3) {
            $updateparent = "UPDATE `tasks` SET taskstatus = '0' WHERE taskid ='" . getTaskInfobyID($taskid, 'parent') . "'";
            mysqli_query($con, $updateparent);
        }
        if (getProjectStatusInPercent(getTaskInfobyID($taskid, 'projectid')) == 100) {
            $body = "Hallo " . getUserFullName($projectmanagerid) . ",\n\n";
            $body .= "Dies ist eine automatische E-Mail um Ihnen mitzuteilen, dass die letzte Aufgabe in \"" . getProjectInfoByID($projectid, 'projectname') . "\" erledigt wurde.";
            smtpmailer($projectmanagermail, 'Projekt: ' . getProjectInfoByID($projectid, 'projectname'), $body);
        }
        if (getTaskInfobyID($taskid, 'creator') != getTaskInfobyID($taskid, 'userid') && $statusid == 3) {
            $creator = getTaskInfobyID($taskid, 'creator');
            $body = "Hallo " . getUserFullName($creator) . ",\n";
            $body .= "Die Aufgabe (" . getTaskInfobyID($taskid, 'taskname') . "), die du " . getUserFullName(getTaskInfobyID($taskid, 'userid')) . " zugewiesen hast wurde erledigt.";
            smtpmailer(getUserInfo($creator, 'email'), 'Aufgabe: ' . getTaskInfobyID($taskid, 'taskname'), $body);
        }
        header("Location: " . $_SERVER['HTTP_REFERER']);
    } else {
        die("Bearbeiten fehlgeschlagen");
    }
}
开发者ID:unbelauscht,项目名称:projectplanungbootstrap,代码行数:31,代码来源:edit.php

示例15: gui_mail_validate

function gui_mail_validate($email, $validate_code)
{
    $ten_tv = get_value_dk('thanhvien', 'Email', $email, 'Username');
    //echo $ten_tv;
    //
    $noi_dung = "Xin chào bạn " . $ten_tv . ",<br/>\n\nĐịa chỉ email này đã được sử dụng để đăng ký tài khoản thành viên tại website CẦN THƠ NEW.<br/><br/>\n\nXin vui lòng kích hoạt tài khoản bằng cách truy cập vào đường link dưới đây:<br/><br/>\n\n\t\t<a href=localhost/canthonew/validate.php?c={$validate_code}&e={$email}>" . "Kích hoạt tài khoản của bạn tại đây </a>\n<br/><br/>\nSau khi kích hoạt thành công, hãy cập nhật thông tin cá nhân chính xác để được bảo vệ các quyền lợi và được hỗ trợ tốt nhất khi sử dụng các dịch vụ và tiện ích của Website Cần Thơ New<br/><br/>\nLưu ý:<br/>\n- Nếu trong 24 giờ bạn không kích hoạt tài khoản, hệ thống sẽ tự động hủy tài khoản của bạn.<br/>\n- Đây là email được gửi tự động từ hệ thống. Bạn không cần trả lời thư này. Nếu bạn gặp vấn đề trong khi kích hoạt tài khoản, vui lòng liên hệ CẦN THƠ NEW.<br/><br/>\n\nNếu thư này nằm ở thư mục spam, để những lần sau thư luôn vào Inbox, bạn vui lòng nhấn chuột vào tính năng Not Spam (của Yahoo, Gmail) hoặc di chuyển thư này về thư mục Inbox. <br/><br/>\n\nCảm ơn bạn vì đã trở thành thành viên của CẦN THƠ NEW.<br/>\n\n";
    smtpmailer($email, '$newcantho@gmail.com', 'CẦN THƠ NEW', 'KÍCH HOẠT THÀNH VIÊN', $noi_dung);
}
开发者ID:shivabt,项目名称:canthonew,代码行数:8,代码来源:func.php


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