Guest User

Untitled

a guest
Jul 27th, 2018
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. 1. Please go to index.html and add this to the form https://tppr.me/5hpI8:
  2. <form action="mail.php" method="post" id="contactform" class="contact-form">
  3.  
  4. 2. After that create mail.php file in the template directory and add this inside of it:
  5. <?php
  6. if(isset($_POST['email'])){
  7. $mailTo = "[email protected]";
  8. $subject = "mail from web";
  9. $body = "New message from web
  10. <br><br>
  11. FROM: ".$_POST['email']."<br>
  12. NAME: ".$_POST['name']."<br>
  13. COMMENTS: ".$_POST['message']."<br>";
  14. $headers = "To: muziq <".$mailTo.">\r\n";
  15. $headers .= "From: ".$_POST['name']." <".$_POST['email'].">\r\n";
  16. $headers .= "Content-Type: text/html";
  17. //envio destinatario
  18. $mail_success = mail($mailTo, utf8_decode($subject), utf8_decode($body), $headers);
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment