in reply to How do you properly use sendmail?

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Answer: How do you properly use sendmail?
by Juerd (Abbot) on Aug 05, 2003 at 06:46 UTC

    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' }