in reply to Mail::Sendmail - how to configure mail server?

Check your outgoing mail (smtp) port and smtp server information (Example: 192.125.1.45). In sendmail.pm, default port value given is 25 (change it if you always use a non-standard port).
unshift @{$Mail::Sendmail::mailcfg{'smtp'}} , "192.125.1.45";