Hi
I'm now using PHPmailer and I ave an issue with the way it attaches
images into a HTML mail.
As you can see below, you have to use $mail->AddEmbeddedImage for every image contained in the HTML mail :
Code:
$mail = new PHPMailer();
$mail->From = $_SESSION["admin_email"];
$mail->FromName = strtoupper($_SERVER['HTTP_HOST']);
$mail->Subject = $mail_subject;
foreach ($my_array["pics"]["filenames"] as $key => $filename) {
$mail->AddEmbeddedImage($my_array["pics"]["paths"][$key] . $filename, $filename, $filename, "base64", "image/gif");
}
$mail->Body = $mail_html;
$mail->AltBody = $mail_text;
$mail->AddAddress($GLOBALS["member_email"], $GLOBALS["member_email"]);
The question is : because $mail_html is user input, how could I scan the content of $mail_html in order to populate all the used images into
$my_array["pics"]["paths"] for the paths and $my_array["pics"]["filenames"] for the file names?
Thanks!