Guest User

Untitled

a guest
Nov 2nd, 2018
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. <?php
  2. include ("server.php");
  3. require 'phpmailer/PHPMailerAutoload.php';
  4. $mail = new PHPMailer;
  5. $mail->isSMTP();
  6. $mail->Host='smtp.gmail.com';
  7. $mail->Port=587;
  8. $mail->SMTPAuth = true;
  9. $mail->SMTPSecure='tls';
  10.  
  11. $mail->Username='my email here';
  12. $mail->Password='my password here';
  13.  
  14. //$email = 'sender email';
  15. $mail->setFrom('XYZ.trial@gmail.com','XYZ Team');
  16. $mail->addAddress($email);
  17. $mail->addReplyTo('XYZ.trial@gmail.com');
  18.  
  19. $mail->isHTML(true);
  20. $mail->Subject='NOREPLY';
  21. $mail->Body='
  22. <head>
  23. <meta name="viewport" content="width=device-width, initial-scale=1">
  24. <style>
  25. * {
  26. box-sizing: border-box;
  27. }
  28.  
  29. body {
  30. font-family: Arial, Helvetica, sans-serif;
  31. }
  32.  
  33. /* Style the header */
  34. header {
  35. background-color: #666;
  36. padding: 30px;
  37. text-align: center;
  38. font-size: 35px;
  39. color: white;
  40. }
  41.  
  42. /* Create two columns/boxes that floats next to each other */
  43. nav {
  44. float: left;
  45. width: 30%;
  46. height: 300px; /* only for demonstration, should be removed */
  47. background: #ccc;
  48. padding: 20px;
  49. }
  50.  
  51. /* Style the list inside the menu */
  52. nav ul {
  53. list-style-type: none;
  54. padding: 0;
  55. }
  56.  
  57. article {
  58. float: left;
  59. padding: 20px;
  60. width: 70%;
  61. background-color: #f1f1f1;
  62. height: 300px; /* only for demonstration, should be removed */
  63. }
  64.  
  65. /* Clear floats after the columns */
  66. section:after {
  67. content: "";
  68. display: table;
  69. clear: both;
  70. }
  71.  
  72. /* Style the footer */
  73. footer {
  74. background-color: #777;
  75. padding: 10px;
  76. text-align: center;
  77. color: white;
  78. }
  79.  
  80.  
  81. @media (max-width: 600px) {
  82. nav, article {
  83. width: 100%;
  84. height: auto;
  85. }
  86. }
  87. </style>
  88. </head>
  89. <body>
  90.  
  91. <header>
  92. <h2>XYZ</h2>
  93. </header>
  94.  
  95. <section>
  96.  
  97.  
  98. <article>
  99. <h1>Login Successful</h1>
  100. <p>Congratulations! You have successfully logged in.
  101.  
  102. </article>
  103. </section>
  104.  
  105. <footer>
  106. <p>NOREPLY</p>
  107. </footer>
  108.  
  109. </body>';
  110.  
  111. if(!$mail->send()){
  112. echo '<p style="font-family:courier; background-color:#eaecef; font-size:200%; text-align:center;">';
  113. echo "Message could not be send.Please check your Email or contact Developers";
  114. echo "</p>";
  115. }
  116. else{
  117. echo '<p style="font-family:courier; background-color:#eaecef; font-size:200%; text-align:center;">';
  118. echo "The password will be send to you via email given.";
  119. echo "</p>";
  120. }
  121. header( "refresh:2;url=member_form1.php" );
  122. ?>
  123. <p style="font-family:courier; background-color:#eaecef; font-size:200%; text-align:center;">You have successfully Logged In .<br>Directing to the Form...</br></p>
Add Comment
Please, Sign In to add comment