People, I've not got a great understanding of MIME types, so I have a small
question..

Is it possible to have a multipart/mixed email with body data?

The following 2 examples the top one does not work, the lower one does... is
there a way to combine? am I missing something?

many thanks

Geoff


#!/usr/bin/perl
use MIME::Entity;

### 1st message ###
$top = MIME::Entity->build(Type    => "multipart/mixed",
                                   From    => "root\@metalogicplc.com",
                           To      => "geoff\@metalogicplc.com  ",
                           Subject => "This is the subject. mixed / multi",
                           Data    => "==EMS==\n"
                                   );
$top->attach(Path     => "/var/www/ems/images/fup.gif",
             Type     => 'image/gif');

my $sendaddress = $top->smtpsend;


### 2nd message ###
$msg = MIME::Entity->build(Type    => "text/html",
                                   From    => "e-MetalServer",
                                   To      => "geoff\@metalogicplc.com",
                           Subject => "This is the subject. text/html",
                                   Data    => "This is the body of the message"
                                   );
$top->attach(Path     => "/var/www/ems/images/fup.gif",
             Type     => 'image/gif');

my $msg->smtpsend;  #send message!

_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to