View Full Version : Sendmail text file

Mr Twirly Cane
08-16-2002, 12:28 AM
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";

Any help much appreciated

Thanks in advance... :)

08-16-2002, 05: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, 11: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, 04: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";
sir p

08-18-2002, 12:22 AM
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.