-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSendMail.php
More file actions
executable file
·143 lines (109 loc) · 3.44 KB
/
SendMail.php
File metadata and controls
executable file
·143 lines (109 loc) · 3.44 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
require_once 'phpmailer/PHPMailerAutoload.php';
// New PHPMailer Instance.
$mail = new PHPMailer;
//Used to tell mail to use SMTP
$mail->isSMTP();
/**
* Used to enable debugging
* 0 = off ( for production use only)
* 1 = For Displaying the client messages
* 2 = FOr Client and Server Messages.
*/
$mail->SMTPDebug = 1;
// Used to display Debugging messages in friendly manner.
$mail->Debugoutput = 'html';
/**
* set smtp host, port, use encryption or not, etc..,
* for host : Host value is 'smtp.xxxxex.com'
* for port: Port and number is 587
* to set encryption ssl or ttl: SMTPAuth value is 'ssl' or 'tls'
* Whether to use SMTP authentication or not: SMTPAuth value is true or false
*/
$mail->Host = 'smtp.gmail.com';
$mail->Port = 587;
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
/**
* Set user name and password.
* Username:'user@acfd.com';
* Password:'yoursecret';
*/
$mail->Username = 'ramanareddysane20@gmail.com';
$mail->Password = 'Company@123.';
// $mail->Username = 'pixelbc7';
// $mail->Password = 'Ramsurya58$$';
$mail->isHTML(true);
// Set From Address. Usually as username by using setFrom(p1,p2)
//Method from PHPMailer
$mail->setFrom('pixel.jntua@gmail.com','Team Pixel');
// Set to address
$mail->addAddress('ramanareddysane@gmail.com','ramana');
// $mail->addAddress('praveen.kadimi534@gmail.com','Praveen');
// Set Reply adderss by using addReplyTo
$mail->addReplyTo('pixel.jntua@gmail.com','Team Pixel');
//Set Recipient mail address
// $mail->addBcc('swwyrik@gmail.com','Swyrik');
$mail->addBcc('ramanareddysane@gmail.com','ram');
$mail->addBcc('suryatheza@gmail.com','surya');
$mail->addBcc('tejasurya1994@gmail.com','surya');
// Add mail main contents
$mail->Subject = 'Pixel is coming soon!!';
// if($mail->addEmbeddedImage("steve.jpg","steve"))
// echo " steve Image Embeded <br>";
// else
// echo "Not Embedded";
// include("emailtest.php");
// echo "<br> <b> Testing </b> <br>";
// foreach ($emails as $value) {
// echo $value.'<br>';
// $mail->addBCC($value);
// }
/*echo "<br> <b> batch11 </b> <br>";
include("batch11.php");
foreach ($emails as $value) {
echo $value.'<br>';
$mail->addBCC($value);
}*/
/*echo "<br> <b> batch10 </b> <br>";
include("batch10.php");
foreach ($emails as $value) {
echo $value.'<br>';
$mail->addBCC($value);
}*/
/*echo "<br> <b> batch08 </b> <br>";
include("batch08.php");
foreach ($emails as $value) {
echo $value.'<br>';
$mail->addBCC($value);
}
*/
/*echo "<br> <b> batch06 </b> <br>";
include("batch06.php");
foreach ($emails as $value) {
echo $value.'<br>';
$mail->addBCC($value);
}*/
/*echo "<br> <b> dileepBatch </b> <br>";
include("dileepBatch.php");
foreach ($emails as $value) {
echo $value.'<br>';
$mail->addBCC($value);
}*/
/*echo "<br> <b> unknownBatch </b> <br>";
include("unknownBatch.php");
foreach ($emails as $value) {
echo $value.'<br>';
$mail->addBCC($value);
}*/
// $mail->addBcc('ramanareddysane@gmail.com','Ram');
// $mail->msgHTML(file_get_contents("snr.php"));
$mail->msgHTML(file_get_contents("workshop.html"));
// $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->AltBody = 'This is an invitation for Pixel 2k16 - Dept of CSE, JNTU Anantapur';
echo "Sending.... <br>";
if(!$mail->send())
echo '<span style="color:red;">Not send: </span>'. $mail->ErrorInfo;
else
echo "<span style='color:green'>Message Sent </span> <br>";
?>