Guest User

Untitled

a guest
Oct 20th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <?php
  2. $nome = stripslashes($_POST['nome']);
  3. $cognome = stripslashes($_POST['cognome']);
  4. $mittente = stripslashes($_POST['mittente']);
  5. $richiesta = stripslashes($_POST['richiesta']);
  6. $sms = '
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  11. <title>Contatti</title>
  12. </head>
  13. <body style="margin:0px;">
  14. <table cellpadding="0" cellspacing="0" style="height:100%;width:500px;">
  15. <tr>
  16. <td style="height:100%;padding:20px;vertical-align:top;">
  17. <table>
  18. <tr><td colspan="2">
  19. <img src="Url della tua immagine personalizzata" alt="" />
  20. </td>
  21. </tr>
  22. <tr><td width="110"><b>Nome:</b></td>
  23. <td width="300">'.$nome.'</td></tr>
  24. <tr>
  25. <td><b>Cognome:</b></td>
  26. <td>'.$cognome.'</td></tr>
  27. <tr>
  28. <td><b>E-mail:</b></td>
  29. <td>'.$mittente.'</td></tr>
  30. <tr>
  31. <td><b>Richiesta:</b></td>
  32. <td>'.$richiesta.'</td></tr>
  33. </table></td></tr>
  34. </table>
  35. </body>
  36. </html>';
  37. $headers = "From: $nome $cognome <$mittente>n";
  38. $headers .= "Content-Type: text/html; charset=iso-8859-1n";
  39. if(mail($_POST['destinatario'], $oggetto, $sms, $headers)){
  40. echo '&controllo=invio avvenuto con successo.';
  41. }
  42. else{
  43. echo '&controllo=errore: e-mail non inviata.';
  44. }
  45. ?>
Add Comment
Please, Sign In to add comment