sub send_email { open (MAIL, "|$mailprog -t") || die "Can't open $mailprog!\n"; print MAIL "Content-type:text/html\n"; print MAIL "From: $from_email\n"; print MAIL "To: $to_email\n"; print MAIL "Subject: $attention Employment Application : $fields{'name'}\n\n"; print MAIL < Human Resources : Application for Employment
Name: $name
to_the_end close (MAIL); } #### sub Email_Results{ my $message = ' Human Resources : Application for Employment
Name: $name
'; $msg = MIME::Lite->new(From => 'net-admin@someplace.org', To => 'decoraw@someplace.org', Subject => 'Trying to send attachment', Type => 'multipart/mixed'); $msg->attach(Type => 'text/html', Data => $message); $msg->attach(Type => 'application/octet-stream', Path => "$Directory/$File_Name", Filename => $File_Name ); $msg->send(); }