Please have a look at my post here about the security issues with calling external commands. I really hope you've sanitized the variables you are interpolating into that shell command.
I really don't want to use packages for such a simple operation.
You will be doing yourself a huge favor by using a module like Email::Sender and the other Email::* modules by rjbs. Yes, even you can use CPAN! Example code.
But if you really, really want to do it in pure Perl, then at least use a piped open instead of qx + cat:
In reply to Re: sending mail
by haukex
in thread sending mail
by dangiles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |