Send form to various email addresses - How to?

Discussion in 'PHP' started by scubita, Jul 2, 2008.

  1. #1
    Hi guys, thanks for taking a look at this issue:

    how do i send this form to 2 or more email accounts?

    I tried some variations, but all failed :(

    this is the line of code:
    $MailToAddress = "you@yoursite.com"; // your email address

    thanks again
     
    scubita, Jul 2, 2008 IP
  2. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #2
    you can seperate the email addresses by commas eg:

    $MailToAddress = "you@yoursite.com,me@yoursite.com,anyone@yoursite.com";
     
    serialCoder, Jul 2, 2008 IP
  3. AliasXNeo

    AliasXNeo Banned

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    His suggestion should work if your script is using PHP's mail() function.
     
    AliasXNeo, Jul 2, 2008 IP
  4. scubita

    scubita Peon

    Messages:
    5,550
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yep, that's it :D thanks so much.

    EDIT:

    well, forgot to ask a simple but important question: how do i hide the email adresses to where the form is sent to? Is it possible to keep it hiden?
     
    scubita, Jul 2, 2008 IP
  5. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #5
    well, you dont really have to show it, unless you echo the $MailToAddress variable, it should be hidden
     
    serialCoder, Jul 2, 2008 IP