Ver Mensaje Individual
  #5 (permalink)  
Antiguo 09/04/2015, 14:33
superweb360
(Desactivado)
 
Fecha de Ingreso: abril-2015
Ubicación: España
Mensajes: 616
Antigüedad: 9 años, 1 mes
Puntos: 74
Respuesta: enviar a 2 correos

Código PHP:
Ver original
  1. <?php
  2. // multiple recipients
  3. $to  = '[email protected]' . ', '; // note the comma
  4.  
  5. // subject
  6. $subject = 'Birthday Reminders for August';
  7.  
  8. // message
  9. $message = '
  10. <html>
  11. <head>
  12.  <title>Birthday Reminders for August</title>
  13. </head>
  14. <body>
  15.  <p>Here are the birthdays upcoming in August!</p>
  16.  <table>
  17.    <tr>
  18.      <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
  19.    </tr>
  20.    <tr>
  21.      <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
  22.    </tr>
  23.    <tr>
  24.      <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
  25.    </tr>
  26.  </table>
  27. </body>
  28. </html>
  29. ';
  30.  
  31. // To send HTML mail, the Content-type header must be set
  32. $headers  = 'MIME-Version: 1.0' . "\r\n";
  33. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  34.  
  35. // Additional headers
  36. $headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
  37. $headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
  38. $headers .= 'Cc: [email protected]' . "\r\n";
  39. $headers .= 'Bcc: [email protected]' . "\r\n";
  40.  
  41. // Mail it
  42. mail($to, $subject, $message, $headers);?>