htmlmimemail5 problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
scottwater
Forum Newbie
Posts: 18
Joined: Tue Nov 11, 2008 9:07 pm
Location: Richmond, VA

htmlmimemail5 problem

Post by scottwater »

I've downloaded htmlmimemail5 class, ran the examples - emails work fine.

I'm trying to create an html email with pics in it by sending the variable image names from the record set.

[code=text

<?php

require_once('htmlMimeMail5.php');

$mail = new htmlMimeMail5();

$mail->setFrom('Scott and Scott <info@WhereDidYouGetThatTshirt.com>');

$mail->setSubject('cool t-shirt 1221');

$mail->setPriority('high');

$mail->setText('Found a really cool T-Shirt');

$the_image = $row_Recordset1['image_front'] ;

$mail->setHTML($the_image, '/pics');

$mail->addEmbeddedImage(new fileEmbeddedImage($the_image));

$address = 'me@comcast.net';

$result = $mail->send(array($address));
?> 


I can get the embedded picture to attach, but the pic in the html of the email will not display. If i type the file names literaly it works.

Its late - what I want is - send a picture via email to anyone. The user will input the TO address and the rest should be automatic based on the recordset. I'm real new at php - so I got a feeling its simple.

My site http://www.wheredidyougetthattshirt.com then pick on a picture name then click the first 'send to friend' -- just to show you what i'm trying to do.

thanks scott
Post Reply