in reply to Re: Mail::Sender MAIL FROM: does not end with localhost.localdomain
in thread Mail::Sender MAIL FROM: does not end with localhost.localdomain

The debug output file eventually pointed me where I should have gone. It turns out that the Mail::Sender module calls 'gethostbyname' which apparently yields the server name when run from the command line but returns "localhost.localdomain" when using cron. Not sure why though. The fix is to add a 'client' line in the new method.

my $sender = new Mail::Sender ( { smtp => 'a.relay.server.com', from => 'userx@.xyz.com', client => 'linux.server.com', debug => $DEBUG, debug_level => 4, });

All works now.

Paradise: Florida, full tank of gas, no appointments.
  • Comment on Re^2: Mail::Sender MAIL FROM: does not end with localhost.localdomain
  • Download Code