in reply to Attaching images on top/bottom of an already split mail entities

Hi, the code below works for me, and I see 2 major differences. You may need the Type and Encoding for the image attachments, and/or try 'multipart/related'.
my $mime_type = 'multipart/related'; # Create the message headers my $mime_msg = MIME::Lite->new( From => $from_address, To => $to_address, Subject => $subject, Type => $mime_type ) or die "Error creating MIME body: $!\n"; # Attach the HTML content my $message_body = '<html><body><H3>Hello world! <img src="cid:myid.gif"></H3></body></html>'; $mime_msg->attach(Type => 'text/html', Data => $message_body); # Attach the image $mime_msg->attach( Type => 'image/gif', Id => 'myid.gif', Encoding => 'base64', Path => 'pikachu.jpg'); $mime_msg->send;

I'm not really a human, but I play one on earth. flash japh
  • Comment on Re: Attaching images on top/bottom of an already split mail entities
  • Download Code