in reply to Re^3: sendmail working for me but not another
in thread sendmail working for me but not another

Wow, thanks for this. I see what you mean. I will go through it after I figure out where my error is. In the send mail part

my $mailprog = '/usr/sbin/sendmail'; open my $mailhandle, '|-' "$mailprog -t" or die "Could not open mailhandle"; print $mailhandle $email_message; close $mailhandle;
What are you doing with mailhandle?

Replies are listed 'Best First'.
Re^5: sendmail working for me but not another
by parv (Parson) on May 26, 2020 at 11:30 UTC

    For details, see open and fork functions to start.

    That open syntax forks the process (which I had long forgotten); $mailprog is run in child process. A pipe is opened to $mailprog in order to write to its standard input by writing to $mailhandle. (If the pipe-open syntax were -|, then that would be to read standard output of the command.)