-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
47 lines (34 loc) · 1.12 KB
/
Copy pathfunctions.php
File metadata and controls
47 lines (34 loc) · 1.12 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
<?php
if($_POST)
{
require_once("phpmailer/class.smtp.php");
require_once("phpmailer/class.phpmailer.php");
$subject = '731X contato via site - ' . $_POST['assunto'];
$message = $_POST['mensagem'];
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host='smtp.gmail.com';
//$mail->Username = "framework@bluecore.it"; // SMTP username
//$mail->Password = "bluecore1357"; // SMTP password
$mail->Username = "teix.ru@gmail.com"; // SMTP username
$mail->Password = "gktteix731x"; // SMTP password
$mail->IsHTML(true);
$mail->Port = "465";
$mail->SingleTo = true;
$mail->From = $_POST['email'];
$mail->FromName = $_POST['nome'];
$mail->AddAddress('teix.ru@gmail.com');
$mail->AddReplyTo('teix.ru@gmail.com');
$mail->Subject = $subject;
$mail->Body = $message;
$return = $mail->Send();
// Exibe uma mensagem de resultado
if (!$return) {
echo "Não foi possível enviar o e-mail.";
echo "<b>Informações do erro:</b> " . $mail->ErrorInfo;
print_r($return);exit;
}
}
?>