forked from ismaelrodino2/New-personal-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail.php
More file actions
27 lines (20 loc) · 634 Bytes
/
email.php
File metadata and controls
27 lines (20 loc) · 634 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
26
27
<?php
if (isset($_POST['email']) && !empty($_POST['email'])){
$nome = addslashes($_POST['name']);
$email = addslashes($_POST['email']);
$mensagem = addslashes($_POST['message']);
$to = "ismael.rodino@hotmail.com";
$subject = 'Contato - Programador Br';
$body = "Nome: ".$nome."\r\n".
"Email: ".$email."\r\n".
"Mensagem: ".$mensagem;
$header = "From:ismael.tavares.rodino2015@gmail.com"."\r\n".
"Reply-To:".$email."\r\n".
"x=Mailer:PHP/".phpversion();
if (mail($to,$subject,$body,$header)){
echo ('Email enviado com sucesso!');
}else{
echo('O email não pode ser enviado');
}
}
?>