Is your mailer application really called senmail? Does the recipient really have a $ instead of a @ in their address?
Why separate $mailprog and $mailflags? They're always used together, so you might as well use a $mailcommand.
If in your example $recipient is unvalidated user input, you have created a very nice spam gateway.
You should check the return values of open, print and close. Debugging code that doesn't do this is a hell of a job.
open or die;
print or die;
close or die;
It is probably a good idea to use a lexical filehandle.
Juerd
# { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|