Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <link rel="stylesheet" href="stile.css" type="text/css">
  6. <title>Invio Email</title>
  7. </head>
  8. <body>
  9. <?php
  10. //Variabili
  11. $nome=$_POST["nome"];
  12. $cognome=$_POST["cognome"];
  13. $email=$_POST["email"];
  14. $gender=$_POST["gender"];
  15. $interessi=$_POST["Interessi"];
  16.  
  17.  
  18. //mail
  19. require_once ('PHPMailer/PHPMailerAutoload.php');
  20.  
  21. $invio = new PHPMailer;
  22. $invio->IsSMTP();
  23. $invio->Host = 'smtp.live.com';
  24. $invio->SMTPSecure = 'tls';
  25. $invio->SMPTAuth = true;
  26. $invio->Username = 'ilcanaledileon@libero.it';
  27. $invio->Password = 'stefanoilmigliore99';
  28. $invio->Port = '587';
  29.  
  30. $invio->SetFrom('ilcanaledileon@libero.it'); //mittente
  31. $invio->addAddress($email);
  32. $invio->addReplyTo('ilcanaledileon@libero.it'); //Rispondere
  33.  
  34. $invio->Subject = 'Registrazione';
  35. $invio->Body = 'Registrazione al sito';
  36.  
  37. if(!$invio->Send())
  38. {
  39. echo 'Errore nella spedizione: '.$invio->ErrorInfo;
  40. }
  41. else
  42. {
  43. echo 'messaggio inviato';
  44. }
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement