0

I'm trying to send an e-mail using PHPMailer. Here is my code:

require_once('class.phpmailer.php');
require_once('class.smtp.php');
$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPDebug = 2;
$mail->From = 'login@interia.pl';
$mail->AddReplyTo($_POST['email']);
$mail->Host = "poczta.interia.pl";
$mail->Mailer = "smtp"; 
$mail->SMTPAuth = true;
$mail->Username = "login@interia.pl";
$mail->Password = "password";
$mail->Port = 587;
$mail->Subject = $_POST['subject']; 
$mail->Body = $_POST['message'];
$mail->AddAddress ("login@interia.pl",""); 
if($mail->Send()) echo 'E-mail sent';
else echo 'Error! E-mail not sent';

The problem is that it says that e-mail was sent but I'm receiving nothing in my inbox.

michalt38
  • 1,193
  • 8
  • 17

0 Answers0