I used the gethostbyname as suggested as shown in the following Perl extract.
my $full_host_name = (gethostbyname $Host)[0];
print "full_host_name <$full_host_name>\n";
my @ok = $msg->smtpsend(
Host => $full_host_name,
To => $To,
Debug => 1
);
I got the following output in which:
1. gethostname was expanded ad I used this for the Host
2. I still got the message about need to be fully qualified domain address
I then tried altering the $From to include various parts of the expanded host name but without any success!
I suspect I am close so if anyone can suggest the next step it will be much appreciated.
full_host_name <mail.btinternet.bt.lon5.cpcloud.co.uk>
Net::SMTP>>> Net::SMTP(2.31)
Net::SMTP>>> Net::Cmd(2.29)
Net::SMTP>>> Exporter(5.68)
Net::SMTP>>> IO::Socket::INET(1.33)
Net::SMTP>>> IO::Socket(1.37)
Net::SMTP>>> IO::Handle(1.34)
Net::SMTP=GLOB(0x2835118)<<< 220 rgout06.bt.lon5.cpcloud.co.uk ESMTP Service ready
Net::SMTP=GLOB(0x2835118)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0x2835118)<<< 250-rgout06.bt.lon5.cpcloud.co.uk
Net::SMTP=GLOB(0x2835118)<<< 250-DSN
Net::SMTP=GLOB(0x2835118)<<< 250-8BITMIME
Net::SMTP=GLOB(0x2835118)<<< 250-PIPELINING
Net::SMTP=GLOB(0x2835118)<<< 250-AUTH=LOGIN
Net::SMTP=GLOB(0x2835118)<<< 250-AUTH LOGIN PLAIN
Net::SMTP=GLOB(0x2835118)<<< 250-DELIVERBY 300
Net::SMTP=GLOB(0x2835118)<<< 250 SIZE 41943040
Net::SMTP=GLOB(0x2835118)>>> MAIL FROM:<postmaster@hm-insp15>
Net::SMTP=GLOB(0x2835118)<<< 553 <postmaster@hm-insp15> Invalid mail address, must be fully qualified domain
Net::SMTP=GLOB(0x2835118)>>> QUIT
Net::SMTP=GLOB(0x2835118)<<< 221 rgout06.bt.lon5.cpcloud.co.uk QUIT
|