I have this simple part of the program that should send an email to a specified user. But it has an error that says "Can't call method "MailMsg" on an undefined value"
if ($sender->MailMsg({smtp => 'mail.myISP.com',
from => 'suezy.ourdomainhere.com',
to =>'[email protected]',
subject => 'this is a test',
msg => "testing....\n?"}) < 0)
{
die "$Mail::Sender::Error\n";
}
print "Successfully sent."
Something wrong? Can anyone give me suggestions please? Is it possible that I wasn't able to install the package properly?