First, note the use of Hello. It's the hostname used in the EHLO command.#!/usr/bin/perl use strict; use warnings; use Net::SMTP::TLS; my $mailer = new Net::SMTP::TLS( 'your.mail.host', Hello => 'some.host.name', Port => 587, User => 'emailuser', Password=> 'password'); $mailer->mail('emailuser@your.mail.host'); $mailer->to('someonecool@somewhere.else'); $mailer->data; $mailer->datasend("Sent thru TLS!"); $mailer->dataend; $mailer->quit;
Second, if you are using Postfix, then you'll need to check the config. You might need to specify port 587. For example, find your config and list your transport something like:
Check the documentation of Postfix for more info.transport=Net::SMTP::TLS user@exmple.com Password 12345 Port 587
In reply to Re^3: add to MIME::Lite support for smtp tls on port 587
by Khen1950fx
in thread add to MIME::Lite support for smtp tls on port 587
by swilting
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |