-
Notifications
You must be signed in to change notification settings - Fork 13
/
fsins.php
42 lines (36 loc) · 1.76 KB
/
fsins.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
<?php
/* CALL */
//sendMail('[email protected]', 'Tanuj Patra', 'STONE', '[email protected]', 'Testing email function 1','Testing email function 1');
function sendMail($ToEmail,$ToName,$FromName,$bcc,$subject,$messageBody){
require "class.phpmailer.php";
$mail = new PHPMailer;
$mail->isSMTP(); // Set mailer to use SMTP
$mail->SMTPDebug = 2;
$mail->Host = 'smtp.gmail.com'; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Password = 'aaranstone2'; // SMTP password suratrealestate admin@123*
$mail->SMTPSecure = 'ssl'; // Enable encryption, 'ssl' also accepted
$mail->Port = '465'; //Port Number
$mail->From = '[email protected]'; //From Email Id
$mail->FromName = $FromName; //From Email Id Display Name Surat Real Esate(Real Estate)
//$mail->addAddress('[email protected]', 'Josh Adams'); // Add a recipient
$mail->addAddress($ToEmail,$ToName); // Name is optional
//$mail->addReplyTo('[email protected]', 'Information');
//$mail->addCC('[email protected]');
//$mail->addBCC($bcc);
$mail->WordWrap = 50; // Set word wrap to 50 characters
//$mail->addAttachment(''); // Add attachments
//$mail->addAttachment('',''); // Optional name
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = $subject;
$mail->Body = $messageBody;
if(!$mail->send()){
//header("location:thanks.php");
echo 0;
}
else{
echo 1;
}
}
?>