%Mail::Sendmail::mailcfg This hash contains all configuration options. You normally edit it once (if ever) in Sendmail.pm and forget about it, but you could also access it from your scripts. For readability, I'll assume you have imported it. The keys are not case-sensitive: they are all converted to lowercase before use. Writing $mailcfg{Port} = 2525; is OK: the default $mailcfg{port} (25) will be deleted and replaced with your new value of 2525. . . . $mailcfg{retries} $mailcfg{retries} = 1; How many times should the connection to the same SMTP server be retried in case of a failure. Default: 1;