-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsend.php
More file actions
25 lines (18 loc) · 708 Bytes
/
send.php
File metadata and controls
25 lines (18 loc) · 708 Bytes
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
<?php
if(isset($_POST['firstname']) && isset($_POST['lastname']) && isset($_POST['email']) && isset($_POST['message'])) {
//require("class.phpmailer.php"); //you have to download this plugin from github.com - link is in documentation
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$message = $_POST['message'];
$mail = new PHPMailer();
$mail->From = $email;
$mail->CharSet = "UTF-8";
$mail->FromName = $email;
$mail->addAddress("youremail@company.com");
$mail->IsHTML(true);
$mail->Subject = $name." sent you an email";
$mail->Body = $message."<br><br>".$name."<br>".$email."<br>".$phone."<br>";
$mail->send();
}
?>