<?php
require 'funcoes/PHPMailer-master/PHPMailerAutoload.php';
$email = $_POST['email'];
$nome = $_POST['nome'];
$titulo = $_POST['titulo'];
$mensagem = $_POST['mensagem'];
$mail = new PHPMailer;
$mail->SMTPDebug = 3;
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'meuemail';
$mail->Password = 'senha';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->From = $email;
$mail->Sender = $email;
$mail->FromName = $nome;
$mail->AddAddress('meuemail', 'Milton Viziak');
$mail->AddAddress('meuemail');
$mail->Subject = $titulo;
$mail->Body = $mensagem;
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
My question is why am I sending emails to min even if I put the from and sender with the email received in the form?