Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include ("server.php");
- require 'phpmailer/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host='smtp.gmail.com';
- $mail->Port=587;
- $mail->SMTPAuth = true;
- $mail->SMTPSecure='tls';
- $mail->Username='my email here';
- $mail->Password='my password here';
- //$email = 'sender email';
- $mail->setFrom('XYZ.trial@gmail.com','XYZ Team');
- $mail->addAddress($email);
- $mail->addReplyTo('XYZ.trial@gmail.com');
- $mail->isHTML(true);
- $mail->Subject='NOREPLY';
- $mail->Body='
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <style>
- * {
- box-sizing: border-box;
- }
- body {
- font-family: Arial, Helvetica, sans-serif;
- }
- /* Style the header */
- header {
- background-color: #666;
- padding: 30px;
- text-align: center;
- font-size: 35px;
- color: white;
- }
- /* Create two columns/boxes that floats next to each other */
- nav {
- float: left;
- width: 30%;
- height: 300px; /* only for demonstration, should be removed */
- background: #ccc;
- padding: 20px;
- }
- /* Style the list inside the menu */
- nav ul {
- list-style-type: none;
- padding: 0;
- }
- article {
- float: left;
- padding: 20px;
- width: 70%;
- background-color: #f1f1f1;
- height: 300px; /* only for demonstration, should be removed */
- }
- /* Clear floats after the columns */
- section:after {
- content: "";
- display: table;
- clear: both;
- }
- /* Style the footer */
- footer {
- background-color: #777;
- padding: 10px;
- text-align: center;
- color: white;
- }
- @media (max-width: 600px) {
- nav, article {
- width: 100%;
- height: auto;
- }
- }
- </style>
- </head>
- <body>
- <header>
- <h2>XYZ</h2>
- </header>
- <section>
- <article>
- <h1>Login Successful</h1>
- <p>Congratulations! You have successfully logged in.
- </article>
- </section>
- <footer>
- <p>NOREPLY</p>
- </footer>
- </body>';
- if(!$mail->send()){
- echo '<p style="font-family:courier; background-color:#eaecef; font-size:200%; text-align:center;">';
- echo "Message could not be send.Please check your Email or contact Developers";
- echo "</p>";
- }
- else{
- echo '<p style="font-family:courier; background-color:#eaecef; font-size:200%; text-align:center;">';
- echo "The password will be send to you via email given.";
- echo "</p>";
- }
- header( "refresh:2;url=member_form1.php" );
- ?>
- <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