CGI::Carp and Mail::SendEasy don't work on

Posted by jonpants on 2014-06-02 09:25

On an old computer i created a couple of simple webforms years ago with a Perl script that would take a few html form fields, run through a script, and send an email to my inbox. On my new computer with Windows 8.1 i have used the same files (copy/paste) but when i submit the web form i get an IIS error:

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

I whittled down the script and it seems to get hung up on the Carp and SendEasy portions. Here is the script that works on my old XP computer but not 8.1:

use CGI;
use CGI::Carp qw(carpout fatalsToBrowser);
use Mail::SendEasy;

print "Content-type: text/html\n\n";
print "Done";

my $cgi = new CGI;
my $Reminder = $cgi->param('Reminder');
my $message =<<EOF;

my $status = Mail::SendEasy::send(
smtp =>  'localhost' ,
user => 'user' ,
pass => 'password' ,
from => '' ,
from_title => 'ME' ,
to => '' ,
subject => "Reminder Message" ,
html =>  $message,
msgid => "0101" ,
) ;

if (!$status) { Mail::SendEasy::error ;}