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:
|
| Szanowny użytkowniku! |
|
[/code] kod wysyłki:
[code] require ‘lib/phpmailer2/class.phpmailer.php’; require ‘lib/phpmailer2/class.smtp.php’; $mail = new PHPMailer(); $mail->isSMTP(); $mail->CharSet=“utf-8”; $tytul = “=?utf-8?B?”.base64_encode("$tytul")."?="; //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 { echo “Message sent!”; }
Wie ktoś może dlaczego to nie chce działać??
Z góry dziękuję za pomoc,
Northwest