PDA

View Full Version : Sendmail text file



Mr Twirly Cane
08-15-2002, 11:28 PM
Hi all!

I'm new to Perl and trying to adapt a short "tell-a-friend" script. I simply want the text email that the script sendmails to call a picture file. Can this be done?

The best I've achieved is getting the <img src="http//... link text shown in the resulting email. The bold is my attempt...

sub mailinfo
{
open(MAIL, "|$mailprogram -t") || die "No response from server !\n\n";
print MAIL "From: $from_email\n";
print MAIL "To: $to_email\n";
print MAIL "Subject: $subject\n\n";

print MAIL @mailtext;
print "<img src="http://kover-it.com/ecard/b2.gif">\n";
close(MAIL);
}


Any help much appreciated

Thanks in advance... :)

pager
08-16-2002, 04:09 AM
you need to check out the mime thing on a good search engine.... since you're trying to actually have a gif file to display in someone's mail client.

You're only missing one thing I think.

having to do with multi-part etc...

Mr Twirly Cane
08-16-2002, 10:00 AM
Hi Pager

Not trying to include an attachment. Is that what you meant?

Trying to simply call a picture file from remote server.

Thanks :)

sir pannels
08-17-2002, 03:59 PM
hey man,
your prob is not bad.. just replace
print "<img src="http://kover-it.com/ecard/b2.gif">\n";
with this and it`ll be fine..
print "<img src=\"http://kover-it.com/ecard/b2.gif\">\n";
cya
sir p

wolfpower
08-17-2002, 11:22 PM
You can write an html file and send that as an attachment. That will show the the html file in the email and not just a plain text email.