PDA

View Full Version : send HTML email with pictures


hogtied
02-27-2003, 01:05 AM
Hello,

I have this perl script so far:

#!/usr/local/bin/perl

print "Content-type: text/html\n\n";

$formData = $ENV{'QUERY_STRING'};
@data = split(/&/, $formData);
foreach $data (@data) {
($name, $value) = split(/=/, $data);
$email{$name} = $value;
}

open(MAIL, "|/usr/bin/sendmail -t");
print MAIL "To: $email{to}\n";
print MAIL "From: $email{from}\n";
print MAIL "Subject: Feedback from\n\n";
close (MAIL);

this alone works fine. What I want to do is to be able to send pictures. The only way I know (and correct me if I'm wrong) is that this can only be done using HTML not Plain Text.

My question is how do you send an HTML email with pictures in it.??

Thanks,
Hogtied

hogtied
02-27-2003, 07:33 AM
I've been researching this topic for hours now and can't locate any information about send HTML emails with pictures using perl sendmail.

but I did find some information about this using PHP. Question is can this even be done with perl? and also the above question still stands.

Thanks

stylempire
03-10-2003, 05:10 PM
it can be done from a form, but if you want to attatch an image, you will need an upload feature, and a totally different script.

Look around at hotscripts.com or planet-source-code.com

For anything to do woth emails, and forms, and we will probably come across one.

Can I ask exactly what it is used for?

I may be able to give you some code.

hogtied
03-11-2003, 01:20 AM
Thanks stylempire,

But i have found an alternative to send email as HTML with pictures (not attached but displayed) using Perl and the MIME::Lite module.

Thanks..