wispas Posted January 18, 2010 Share Posted January 18, 2010 I currently have a mail form that sends to a single email address. Does anyone know how i can set it up so it sends out to more than one email address. Thanks! The Form <form method="POST" action="mailer.php"> <input type="text" name="name" size="19"><br> <br> <input type="text" name="email" size="19"><br> <br> <textarea rows="9" name="message" cols="30"></textarea> <br> <br> <input type="submit" value="Submit" name="submit"> </form> Processing PHP <?php if(isset($_POST['submit'])) { $to = "[email protected]"; $subject = "Form Tutorial"; $name_field = $_POST['name']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message"; echo "Data has been submitted to $to!"; mail($to, $subject, $body); } else { echo "blarg!"; } ?> Link to comment https://forums.phpfreaks.com/topic/188901-mailing-form-to-multiple-recipients/ Share on other sites More sharing options...
aebstract Posted January 18, 2010 Share Posted January 18, 2010 $to = "[email protected], [email protected], [email protected]"; This isn't a mysql question. Link to comment https://forums.phpfreaks.com/topic/188901-mailing-form-to-multiple-recipients/#findComment-997357 Share on other sites More sharing options...
wispas Posted January 18, 2010 Author Share Posted January 18, 2010 that worked very well. thank you! sorry for putting it into the wrong forum. can administrator please move to php forums. Link to comment https://forums.phpfreaks.com/topic/188901-mailing-form-to-multiple-recipients/#findComment-997359 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.