Skip to content

Commit 690dd6e

Browse files
initial commit
0 parents  commit 690dd6e

File tree

226 files changed

+26796
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+26796
-0
lines changed

activate_email.php

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?php
2+
3+
if(!isset($_SESSION['email_address']))
4+
header('location:index.php');
5+
6+
if(!isset($_SESSION)){
7+
session_start();
8+
}
9+
10+
require 'phpmailer/PHPMailerAutoload.php';
11+
12+
$mail = new PHPMailer;
13+
14+
//$mail->SMTPDebug = 3; // Enable verbose debug output
15+
16+
$mail->isSMTP(); // Set mailer to use SMTP
17+
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
18+
$mail->SMTPAuth = true; // Enable SMTP authentication
19+
$mail->Username = 'your email address'; // SMTP username
20+
$mail->Password = 'smtp password'; // SMTP password
21+
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
22+
$mail->Port = 587; // TCP port to connect to
23+
$to=$_SESSION['email_address'];
24+
$mail->setFrom('your email address', 'Musical World');
25+
$mail->addAddress($to); // Add a recipient
26+
27+
$mail->isHTML(true); // Set email format to HTML
28+
29+
$mail->Subject = 'Account Confirmation Message';
30+
$mail->Body = " Thank You ".$_SESSION['username']. " for signing up!
31+
Your account has been created, you can login with the following credentials after you have activated <br> your account by pressing the url below.
32+
33+
------------------------<br><br><br><br>
34+
Username:" .$_SESSION['email_address']."<br>
35+
Password:" .$_SESSION['password']."<br><br><br><br>
36+
------------------------
37+
38+
Please click this link to activate your account:----------------------<br><br><br><br>
39+
http://localhost/musical_world/verify.php?email_address=".$_SESSION['email_address']."&activation_code=".$_SESSION['activation_code']." "; // Our message above including the link
40+
41+
if(!$mail->send()){
42+
echo 'Message could not be sent.';
43+
echo 'Mailer Error: ' . $mail->ErrorInfo;
44+
}else{
45+
echo '<script type="text/javascript">';
46+
echo 'setTimeout(function () { sweetAlert("Success","<b> Thank you '. $username .' you have successfully registered.A confirmation link has been sent to your email address '. $email_address .' Please activate your account by clicking the activation link!!!...</b>","success");';
47+
echo '}, 500);</script>';
48+
}
49+
?>
50+
51+
<!DOCTYPE html>
52+
<html>
53+
<head>
54+
<title></title>
55+
<meta name="viewport" content="width=device-width, initial-scale=1">
56+
<link rel="icon" href="img/KEERTHANA KUTEERA LOGO-ICON-01.png" type="image/x-icon">
57+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
58+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.min.css">
59+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
60+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
61+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.min.js"></script>
62+
</head>
63+
<body>
64+
65+
</body>
66+
</html>

0 commit comments

Comments
 (0)