############################################################## # Embed JPG image in email body. # Note: This does NOT work. ############################################################## $smtp->datasend("MIME-Version: 1.0\n"); $smtp->datasend("Content-Type: text/html; boundary=$boundary\n"); $smtp->datasend("Content-Transfer-Encoding: base64\n"); $smtp->datasend("Content-Disposition: inline\n"); $smtp->datasend("\n"); $smtp->datasend("<body><img alt=\"My Picture\" img src=\""); open(my $fh2, '<', $pic) || die("Could not open Jpg file!"); binmode($fh2); local $/=undef; while (read($fh2, my $chunk, 72*57)) { my $buf = &encode_base64( $chunk ); $smtp->datasend($buf); } close($fh2); $smtp->datasend("\"></body>");
"It's not how hard you work, it's how much you get done."
In reply to Re:Send Email With Picture Embedded in Body of Email
by roho
in thread Send Email With Picture Embedded in Body of Email (SOLVED)
by roho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |