in reply to Problems Trying to Send E-Mail and Insert into Database

HI there,

here's a little fix. I had that problem once...

here's the code:

# add the recipient -t <recipient>
# I think it's required.

open(MAIL, "|$sendmail -oi -t $recipient") or die "Can't open pipe to $sendmail: +$!\n";

# Cya
AgentKelly - Too Bored To Log In =)
  • Comment on Re: Problems Trying to Send E-Mail and Insert into Database

Replies are listed 'Best First'.
RE: Re: Problems Trying to Send E-Mail and Insert into Database
by merlyn (Sage) on Aug 21, 2000 at 07:52 UTC
    That code is dangerous unless you have precise control over $recipient. What's worse is that you already have -t, which means the message itself will be scanned for the recipients, so you don't (and shouldn't) specify them on the shell command line.

    -- Randal L. Schwartz, Perl hacker

      Thanks =) i'm honored cuz u'r the one who replied =)
      That's a great help for me too =)
      Cya and a real big thanks
      AgentKelly