My question is similar to mailx sending message as bin attachment, but none of the solutions listed there worked for me.
On the contrary, the email is always sent as attachment, even if I remove all the line breaks.
Below, there is my Perl code:
my $cmd = "/usr/bin/mailx $Email_SendCharsets -s \"$hostname: $subject\" $Email_Auth -r $retAddr $addresses";
my $rc = open3(\*CHLD_IN, \*CHLD_OUT, \*CHLD_ERR, $cmd);
if ($rc != 0)
{
print CHLD_IN $message;
close CHLD_IN;
... other things here ...
}
... other things here ...
Any idea why this is happening?
PS: I'm running the code with Perl 5.10 on RHEL 8.x