Witam serdecznie,
Mam mały problem z wysyłką maila z phpmailera.... Wysyła maile poprawie (są w załączniku maila obrazki) - ale ich nie wyświetla...
Testuję na gmail, outlook, wp itp...
Mój html wygląda następująco:
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600"> <tr style="height:800px"> <td style="color:#006600; font-size: 14px; width:100%"> <table border="0" cellpadding="0" cellspacing="0" style="background-image: url(cid:tlo); background-repeat: no-repeat; "> <td style="color:white; font-size: 24px; width:100%; font-weight: bold; padding-left: 43px;"> Szanowny użytkowniku!
</p>
body {
background-image: none; padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; font-family: Open Sans;
</style>
kod wysyłki:
require 'lib/phpmailer2/class.phpmailer.php';
require 'lib/phpmailer2/class.smtp.php';
$mail = new PHPMailer();
$mail->isSMTP();
$mail->CharSet="utf-8";
//Enable SMTP debugging
// 0 = off (for production use)
// 1 = client messages
// 2 = client and server messages
$mail->SMTPDebug = 0;
//Ask for HTML-friendly debug output
$mail->Debugoutput = 'html';
//Set the hostname of the mail server
$mail->Host = 'poczta.pl';
//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
$mail->Port = 587;
//Set the encryption system to use - ssl (deprecated) or tls
$mail->SMTPSecure = 'tls';
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
//Username to use for SMTP authentication - use full email address for gmail
$mail->Username = "noreply@mail.com.pl";
//Password to use for SMTP authentication
$mail->Password = "haslo";
//Set who the message is to be sent from
$mail->setFrom('noreply@mail.com.pl', 'noreply@mail.com.pl');
//Set an alternative reply-to address
$mail->addReplyTo('noreply@mail.com.pl', 'noreply@mail.com.pl');
//Set who the message is to be sent to
$mail->addAddress("$doo");
//Set the subject line
$mail->Subject = "$tytul";
//Read an HTML message body from an external file, convert referenced images to embedded,
//convert HTML into a basic plain-text alternative body
$mail->MsgHTML("$tresc");
//Replace the plain text body with one created manually
//$mail->AltBody = 'This is a plain-text message body';
//Attach an image file
$mail->addAttachment('../../../images/mail.jpg');
$mail->AddEmbeddedImage('../../../images/mail.jpg','tlo');
$mail->AddEmbeddedImage('../../../images/mail.jpg');
//send the message, check for errors
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo; } else {
}
Wie ktoś może dlaczego to nie chce działać(IMG:
style_emoticons/default/questionmark.gif) (IMG:
style_emoticons/default/sad.gif)
Z góry dziękuję za pomoc,
Northwest