SSYT

Mail Form HTML

Jul 29th, 2016
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.15 KB | None | 0 0
  1. <?php
  2. // Destinatari multipli
  3. $to  = '[email protected]' . ', '; // observați virgula
  4.  
  5. // Subiectul
  6. $subject = 'Birthday Reminders for August';
  7.  
  8. // Mesajul
  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. // Pentru a trimite mesaje HTML, trebuie stabilit antetul Content-type
  32. $headers  = 'MIME-Version: 1.0' . "\r\n";
  33. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  34.  
  35. // Antete suplimentare
  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. // Trimiterea mesajului
  42. mail($to, $subject, $message, $headers);
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment