in reply to add to MIME::Lite support for smtp tls on port 587
It doesn't work perfectly. You need to reduce your posts to a minimum runnable snippet that can reproduce your error.
Port 25 is the default smtp port. To use 587, you'll need to mention it in the source of a form such as:
PeerPort => $arg{Port} || 'smtp(587)',
In the script, mention it in the constructor like
Port => 587,
or
PeerPort => 587,
In Section
Seekers of Perl Wisdom