Diligent web site
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

contact_form.php 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. require_once ('PHPMailer_5.2.0/class.phpmailer.php');
  3. $name = $_POST['name'];
  4. $email = $_POST['email'];
  5. $subject = $_POST['subject'];
  6. $message = $_POST["message"];
  7. // $resume = $_POST["resume"];
  8. // $resume_file = $_FILES["resume-file"];
  9. // $resume_name = $resume_file['name'];
  10. // ob_start(); ?>
  11. <html>
  12. <head>
  13. <title>Apply</title>
  14. </head>
  15. <body>
  16. <table>
  17. <tr>
  18. <td>Name:</td>
  19. <td><?php echo $name; ?></td>
  20. </tr>
  21. <tr>
  22. <td>Email:</td>
  23. <td><a href="mailto:<?php echo $email; ?>"><?php echo $email; ?></td>
  24. </tr>
  25. <tr>
  26. <td>Message:</td>
  27. <td><?php echo $message; ?></td>
  28. </tr>
  29. </table>
  30. </body>
  31. </html>
  32. <?php
  33. $msg = ob_get_clean();
  34. $mail = new PHPMailer();
  35. $mail->IsSMTP(); // telling the class to use SMTP
  36. $mail->SMTPAuth = true;
  37. $mail->SMTPSecure = "tls"; // enable SMTP authentication
  38. $mail->Host = "mail.dilig.net";
  39. $mail->Port = 587;
  40. $mail->Username = "[email protected]"; // SMTP username
  41. $mail->Password = "contactus#dlgnt"; // SMTP password
  42. $mail->SetFrom($email, $name);
  43. $mail->Subject = $subject;
  44. $mail->Body = $msg;
  45. $mail->AddAddress('[email protected]', "HR Diligent");
  46. $mail->IsHtml(true);
  47. $mail->send();
  48. echo json_encode("succesfull");
  49. ?>