-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
58 lines (57 loc) · 1.1 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/*
Author: Osman Çakmak
Skype: oxcakmak
Email: oxcakmak@hotmail.com
Website: http://oxcakmak.com/
Country: Turkey [TR]
*/
require_once('config.php');
require_once('class.phpmailer.php');
$mail = new PHPMailer();
$mail->Host = $config["mail"]["type"].".".$config['mail']['site'];
$mail->SMTPAuth = true;
$mail->Username = $config['mail']['sender'];
$mail->Password = $config['mail']['password'];
$mail->Port = 587;
$mail->IsSMTP();
$mail->IsHTML(true);
/*
[Change "$user_email" to your own code]
[Mail to send addresses]
[-]For example:
[-+-] Print in a loop (Foreach / For / While)
[code]
$mail->AddAddress($user_email);
[/code]
*/
$mail->AddAddress($user_email); //Change
$mail->From = $config['mail']['sender'];
/*
[Email Title]
*/
$mail->FromName = "Account Activation";
$mail->CharSet = $config['mail']['charset'];
/*
[Subject title]
Ex: Project Name
*/
$mail->Subject = "Github";
/*
[Your message template]
*/
$mailContent = 'Hello world';
$mail->MsgHTML($mailContent);
if($mail->Send()) {
/*
[Success Then]
*/
echo "success";
}else{
/*
[Failed Then]
*/
echo $mail->ErrorInfo."<br>";
echo "failed";
}
?>