[thelist] [php] emailing to multiple recipients

Carl Edwards edwards at vitesse.com
Wed Jun 9 18:12:42 CDT 2004


You can change $recipient to a comma separated list
of email addresses:
http://us2.php.net/manual/en/function.mail.php


/Carl

>  -----Original Message-----
>  From: sandra [mailto:sandra.miller1969 at ntlworld.com]
>  Sent: Wednesday, June 09, 2004 4:00 PM
>  To: thelist at lists.evolt.org
>  Subject: [thelist] [php] emailing to multiple recipients
>  
>  
>  Hi,
>  
>  I have a simple script on my site that sends mail to me. I 
>  am looking to
>  hack the script so that it sends to as many as 15 recipients!
>  
>  The script was downloaded from a website, the code is copied 
>  below. Can
>  anyone help?
>  
>  <?php
>  
>  // headers for the email listed below
>  
>  $headers .= "From: $name <$email>\n";  // your email client 
>  will show the
>  person's email address like normal
>  $headers .= "Content-Type: text/plain; 
>  charset=iso-8859-1\n"; // sets the
>  mime type
>  $recipient = "feedback at saveinverclyderoyal.com"; // enter 
>  YOUR email address
>  here
>  $subject = "Feedback from Save IRH"; // this is the subject 
>  of the email
>  
>  $msg = wordwrap( $msg, 1024 );
>  
>  mail($recipient, $subject, stripslashes($msg), $headers); // 
>  the mail()
>  function sends the message to you
>  
>  //Once the data is entered, redirect the user to give them visual
>  confirmation
>     header("location: thanks.php");
>  ?>
>  


More information about the thelist mailing list