I am trying to include an image into my message in phpmailer. The following is my code, Mails are being sent but without the embeded image, instead they're appear to be attached to the email. Not sure what is wrong with my code, please help?
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<?php
require_once('class.phpmailer.php');
require_once('class.smtp.php');
$mail = new PHPMailer();
$mail->CharSet = "UTF-8";
$mail->From = "xxxxx";
$mail->FromName = "Jan Nowak";
$mail->AddReplyTo('xxxx');
$mail->Host = "xxxxxx";
$mail->Mailer = "smtp";
$mail->SMTPAuth = true;
$mail->Username = "xxxxx";
$mail->Password = "xxxxxx";
$mail->Port = xxx; usługi poczty
$mail->Subject = "temat";
$mail->Body = 'treść maila';
$mail->IsHTML(true);
$mail->AddEmbeddedImage('images/Kartka.png', 'Kartka');
$mail->Body = "<h1>Test 1 of PHPMailer html</h1><p>This is a test</p>";
"<p>This is a test picture: <img src=\"images/Kartka.png\" /></p>";
//$mail->addAttachment ('images/Kartka.jpg');
$mail->AddAddress ("xxxxx");
if($mail->Send())
{
echo 'E-mail został wysłany';
}
else
{
echo 'E-mail nie mógł zostać wysłany';
}
?>
</html>
</head>