-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.php
More file actions
52 lines (36 loc) · 1.39 KB
/
dev.php
File metadata and controls
52 lines (36 loc) · 1.39 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
<?php
session_start();
$captcha=$_POST['captcha'];
if($captcha != $_SESSION['code']){
$timer=rand(800,900);
sleep($timer/100);
echo "Enter correct captcha";
exit();
}
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "mail.devomark.com"; // specify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "mohammed@devomark.com"; // SMTP username
$mail->Password = "12486230"; //
$mail->From = "elvis@devomark.com"; //
$mail->FromName = "Elvis";
$mail->AddAddress("irfanansari568@gmail.com", "Irfan Ansari");
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$message=$_POST['message'];
$mail->Subject = "Request for services TK_website";
$mail->Body = "Message:".$message."<br> Name: ".$name."<br> Phone: ".$phone."<br> Email: ".$email; // this is the sender's Email address
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "sent";
?>