function sendVerify($_id, $_email, $_code)
{
    $rs = 0;
    include 'smtp/Send_Mail.php';
    $to = $_email;
    $subject = "FindYourFriend - Xác nhận đăng ký";
    $body = "<body style='font-family:arial'>\n\t<div style='width:680px; height:auto; border: solid 1px #09F; border-radius:10px; background:#EFEFEF'>\n    \t<div style='background:#09F; margin-top:-10px;'><p style='font-size:2em; padding:5px;text-align:center; color:#FFF'>Chào mừng bạn đến với \"Find Your Friend\"</p></div>\n        <div style='padding:0 20px'>\n        \t<p>Chào bạn,</p>\n            <p>Lời đầu tiên xin cảm ơn các bạn đã dùng thử ứng dụng của nhóm!</p>\n            <p>Find Your Friend là một ứng dụng tìm kiếm bạn bè. Ứng dụng được viết nhằm mục đích giúp mọi người dễ dàng tìm kiếm, liên lạc với những người bạn mới gần nơi mình sống, cung cấp nhiều tính năng tìm kiếm, đồng thời cho phép bạn dễ dàng liên lạc với bạn bè khi cần thiết thông qua tính năng nhắn tin miễn phí trực tuyến.</p>\n            <p>Hy vọng ứng dụng này thực sự hữu ích với bạn!</p>\n            <p>Chúc bạn luôn vui vẻ và thành công!</p>\n            <p><i>Bạn hãy vui lòng xác nhận bên dưới để hoàn tất việc đăng ký!</i></p>\n            <a style='display: inline-block;\n  height: 50px;  line-height: 50px;  padding-right: 30px;  padding-left: 30px;  position: relative;  background-color:#09F;  color:rgb(255,255,255);  text-decoration: none;  text-transform: uppercase;  letter-spacing: 1px;  margin-bottom: 15px;  border-radius: 5px;  -moz-border-radius: 5px;  -webkit-border-radius: 5px;  text-shadow:0px 1px 0px rgba(0,0,0,0.5);' href='" . "http://www.sgulab.com/apps/findyourfriend/activation/activation.php?id=" . $_id . "&email=" . $_email . "&code=" . $_code . "'>Xác nhận đăng ký</a>\n        </div>\n    </div>\n</body>";
    return Send_Mail($to, $subject, $body);
}
function sendVerifyPwd($_id, $_email, $_code)
{
    $rs = 0;
    include 'smtp/Send_Mail.php';
    $to = $_email;
    $subject = "FindYourFriend - Quên mật khẩu";
    $body = "<body style='font-family:arial'>\n\t<div style='width:680px; height:auto; border: solid 1px #09F; border-radius:10px; background:#EFEFEF'>\n    \t<div style='background:#09F; margin-top:-10px;'><p style='font-size:2em; padding:5px;text-align:center; color:#FFF'>Chào mừng bạn đến với \"Find Your Friend\"</p></div>\n        <div style='padding:0 20px'>\n        \t<p>Chào bạn,</p>\n            <p>Chúng tôi đã được yêu cầu thay đổi mật khẩu từ email {$_email}. Nếu bạn không chắc đã yêu cầu thì vui lòng bỏ qua email này!</p>\n            <p><i>Để đổi mật khẩu, bạn hãy vui lòng xác nhận bên dưới!</i></p>\n            <a style='display: inline-block;\n  height: 50px;  line-height: 50px;  padding-right: 30px;  padding-left: 30px;  position: relative;  background-color:#09F;  color:rgb(255,255,255);  text-decoration: none;  text-transform: uppercase;  letter-spacing: 1px;  margin-bottom: 15px;  border-radius: 5px;  -moz-border-radius: 5px;  -webkit-border-radius: 5px;  text-shadow:0px 1px 0px rgba(0,0,0,0.5);' href='" . "http://www.sgulab.com/apps/findyourfriend/forgotpassword/changepassword.php?id=" . $_id . "&email=" . $_email . "&code=" . $_code . "'>Thay đổi mật khẩu</a>\n        </div>\n    </div>\n</body>";
    return Send_Mail($to, $subject, $body);
}
Exemple #3
0
           <?php 
include 'db.php';
$msg = '';
if (!empty($_POST['email']) && isset($_POST['email'])) {
    $email = mysqli_real_escape_string($connection, $_POST['email']);
    $regex = '/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$/';
    if (preg_match($regex, $email)) {
        $activation = md5($email . time());
        $count = mysqli_query($connection, "SELECT uid FROM users WHERE email='{$email}'");
        if (mysqli_num_rows($count) < 1) {
            mysqli_query($connection, "INSERT INTO users(email,activation) VALUES('{$email}','{$activation}')");
            include 'smtp/Send_Mail.php';
            $to = $email;
            $subject = "Email verification";
            $body = 'Hi, <br/> <br/> We need to make sure you are human. Please verify your email and get started using your Website account. <br/> <br/> <a href="' . $base_url . 'activation/' . $activation . '">' . $base_url . 'activation/' . $activation . '</a>';
            Send_Mail($to, $subject, $body);
            $msg = "Registration successful, please activate email.";
        } else {
            $msg = 'The email is already taken, please try new.';
        }
    } else {
        $msg = 'The email you have entered is invalid, please try again.';
    }
}
?>
        <div class="form">
            <form action="" method="post">
                <label>Email:</label>
                <input type="text" name="email" class="input" autocomplete="off"/>
                <input type="submit" class="button" value="Subscribe" />
                <span class='msg'><?php 
Exemple #4
0
<?php

require 'sdksendmail.php';
$time = date('H:i', time());
$from = "*****@*****.**";
//Put your actual email address here.
$fromH = "A Human Readable Email Source";
//Optional
$to = ['*****@*****.**'];
//SES Bounce simulator Address for testing
$cc = [];
//to,cc,bcc addresses must be arrays
$bcc = [];
$subject = "Test mail {$time} sent through SES";
//Your preferred subject line
$bodyH = "This message body contains <strong>HTML formatting</strong>. It can, <i>for example</i>, contain links like this one: <a class=\"ulink\" href=\"http://docs.aws.amazon.com/ses/latest/DeveloperGuide\" target=\"_blank\">Amazon SES Developer Guide</a>.";
$bodyT = "This is the message body in text format. It contains no links and no formatting.";
$result = Send_Mail($from, $fromH, $to, $cc, $bcc, $subject, $bodyH, $bodyT);
echo "Email sending...\r\n";
echo $result . "\r\n";
    while ($row = mysqli_fetch_assoc($result)) {
        $Email = $row['Email'];
        mail($Email, '           Competition Result : ', $message, $headers);
    }
}
if (chk_judge() == 1) {
    add_marks();
    //header("Location: login.php");
} else {
    if (chk_judge() == 0) {
        echo "Some Paper not yet judged ";
    }
}
if (isset($_POST['publish'])) {
    publish_result();
    Send_Mail();
}
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Member Area </title>
<style type="text/css">
 .success {
    border: 1px solid;
    margin: 0 auto;
	padding:10px 5px 10px 60px;
	background-repeat: no-repeat;