PHP mail(to, ...) question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JulianKingg
    New Member
    • Feb 2008
    • 1

    PHP mail(to, ...) question

    I am using a basic PHP form. On the process page, it is currently sending the completed form to a single recipient. Now I find that I need to send this completed form to three separate recipients instead. I'm not all that up to date on the protocols, so I am asking your help. My current line is as follows:

    $mymail = 'bob@www.com';

    I also want steve@www.com and bill@www.com to get this email form as well.

    What is the proper protocol I would need to add to this line to ensure that all three received the emailed form? Do I separate by commas? Spaces? Both

    Your help is appreciated.
  • phpmind
    New Member
    • Feb 2008
    • 16

    #2
    You should be able to just seperate the email addresses by commas.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32668

      #3
      Julian, as the PHP forum exists I'm moving your PHP question there from the Lounge (non-technical) forum.

      Good luck & Welcome to TheScripts.

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        See the PHP documentation at THIS LINK for a description of the mail() function.
        Originally posted by php doc

        Receiver, or receivers of the mail.

        The formatting of this string must comply with ยป RFC 2822. Some examples are:

        * user@example.co m
        * user@example.co m, anotheruser@exa mple.com
        * User <user@example.c om>
        * User <user@example.c om>, Another User <anotheruser@ex ample.com>
        Ronald

        Comment

        Working...