use MIME::Lite; my $smtp = 'mail.trump.net.au'; # (typically your ISPs SMTP server) my $from = 'james.freeman@smartsurf.org'; my $to = $from; my @cc = qw( ); # add addresses here to Cc, space separated my $sbj = 'A test with attachment'; my @cc = ( "Cc" => (join ',', @cc) ) if @cc; my $msg = MIME::Lite->new( From => $from, To => $to, @cc, Subject => $sbj, Type =>'multipart/mixed', ) or die "Could not create Mime::Lite object!"; $msg->attach( Type =>'TEXT', Data =>"Here's the file you wanted" ); $msg->attach( Type =>'image/gif', # often 'application/octet-stream' Path =>"C:\\background.gif", # full path to file Filename =>'background.gif' # name we want to use in email for file ); #print $msg->as_string; $msg->send_by_smtp( $smtp) or die "Could not send mail $!\n";