141 users online (0 members and 141 guests)  

Thread: Perl/CGI issue


  Results 1 to 2 of 2

Related

  1. Perl/HTML issue    Forum: CGI Perl Forum
    Replies: 0
  2. Replies: 1
  3. Replies: 1
  4. Replies: 0
  1. #1
    Iridium's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2005
    Posts
    1

    Perl/CGI issue

    I have a strange issue with my CGI contact forms on my newest dedicated server.
    Take a look at the two attached CGIs(txts).

    The only way I can get this CGI mailer to work is to make the recipient one-of-my@domains.com email addy. If I make it ANY other email addy, it doesn't mail out.(or the recipient does NOT receive the email)

    Why would that be?

    Thanks!
    Attached Files Attached Files

  2. #2
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: Perl/CGI issue

    try using this function insted:

    Code:
    sub email_somone{
    open(MAIL, "|/usr/sbin/sendmail -t") or return 0;
    print MAIL, "Reply-to: $_[1]";
    print MAIL, "Subject: $_[2]";
    print MAIL, "To: $_[0]";
    print MAIL, "Content-type: text/plain\n\n";
    print MAIL, $_[3];
    close(MAIL);
    return 1;
    }
    use the following syntex with it, email_somone(to, replyto, subject, contents)

    NOTE: this is an untested script, but in theory it should work!

    -ALL



Tags for this Thread