Results 1 to 2 of 2

Thread: perl form-->email problem

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2001
    Posts
    56

    perl form-->email problem

    Hi,

    I have a form to email script, but it seems that whenever i want it to go to more than 1 email address, the server spits a 500 out at me.

    currently,

    $to = "nullbox\@hotmail.com";

    works.

    but when i add

    $to = "nullbox\@hotmail.com, nullbox2\@hotmail.com";

    it doesnt work.

    anybody know what im doing wrong?

  2. #2
    Member
    Join Date
    Jan 2003
    Posts
    44
    That's because the To: mail header wants a valid e-mail address, and "nullbox\@hotmail.com, nullbox2\@hotmail.com" isn't it. Your best approach would be to loop through a list of address.

    $to = ['[email protected]', '[email protected]'];

    for (@{$to}) {
        ...
        print "To: $_\n";
        ...
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width