Results 1 to 2 of 2
Hi all,
I'm trying to embed a single image into my php mail function.
Following the code part,when i receive the mail -image is shown as an attachment and not
...
- 09-11-2007 #1
[SOLVED] Embed Images in php mail
Hi all,
I'm trying to embed a single image into my php mail function.
Following the code part,when i receive the mail -image is shown as an attachment and not
embedded into the mail.
===========
//im using os commerce mailing functions,
Code:$message = new email(array('X-Mailer: osCommerce Mailer')); $image = $message->get_file("/home/oss/galleria/shoppingcart/htmls/imgEng/Logo.jpg"); $message->add_html_image($image, 'logo'); $message->add_html($email_text, $text);- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 09-12-2007 #2
finally , I got it

try this phpmailer instead of os commerce function
Hope it helps somebody!!!!!!!!Code:$mail = new PHPMailer(); //$mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "apprelay.trc.com"; // SMTP server $mail->From = "lakshmipathi.g@gmail.com"; $mail->FromName = "Mailer-Today"; $mail->AddAddress("lakshmipathi.g@gmail.com"); $mail->WordWrap = 50; // set word wrap $mail->AddEmbeddedImage("/home/oss/Logo.jpg", "my-attach", "Logo.jpg"); $mail->Body = '<img alt="PHPMailer" src="cid:my-attach"> '; $mail->IsHTML(true); // send as HTML $mail->Subject = "image !!!!!!!!"; $mail->AltBody = "This is the text-only body"; if(!$mail->Send()) { echo "Message was not sent <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } echo "Message has been sent";- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------



