sub mailsend { my ($from,$to,$subject,$emailmsg) = @_ ; use Mail::Sendmail; #------------------------------------------------------------------------------- my $boundary = "====" . time() . "===="; #--------------------------------------------------------------------------------- my %mail = () ; # if ($username eq 'rory') { $to = 'rory@kre8it.co.za' ; } unless ($from) { $from = qq(Film Freight ) ; } # unless ($from) { $from = 'Film Freight ' ; } %mail = ( smtp => 'localhost', From => $from, To => $to, Subject => $subject ); #--------------------------------------------------------------------------------- $mail{'content-type'} = "multipart/alternative; boundary=\"$boundary\""; # filmfreight $boundary = '--'.$boundary; $mail{body} = <

$emailmsg

$boundary-- END_OF_BODY sendmail(%mail) ; # $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; # $boundary = '--'.$boundary; # $mail{body} = < # # # $subject # # # $email_msg # # # $boundary-- # END_OF_BODY # sendmail(%mail) ; } #------------------------------------------------------------------------------------ 1;