Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- $html = '
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- So that mobile will display zoomed in -->
- <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- enable media queries for windows phone 8 -->
- <meta name="format-detection" content="telephone=no"> <!-- disable auto telephone linking in iOS -->
- <title>Single Column</title>
- <style type="text/css">
- body {
- margin: 0;
- padding: 0;
- -ms-text-size-adjust: 100%;
- -webkit-text-size-adjust: 100%;
- }
- table {
- border-spacing: 0;
- }
- table td {
- border-collapse: collapse;
- }
- .ExternalClass {
- width: 100%;
- }
- .ExternalClass,
- .ExternalClass p,
- .ExternalClass span,
- .ExternalClass font,
- .ExternalClass td,
- .ExternalClass div {
- line-height: 100%;
- }
- .ReadMsgBody {
- width: 100%;
- background-color: #ebebeb;
- }
- table {
- mso-table-lspace: 0pt;
- mso-table-rspace: 0pt;
- }
- img {
- -ms-interpolation-mode: bicubic;
- }
- .yshortcuts a {
- border-bottom: none !important;
- }
- @media screen and (max-width: 599px) {
- .force-row,
- .container {
- width: 100% !important;
- max-width: 100% !important;
- }
- }
- @media screen and (max-width: 400px) {
- .container-padding {
- padding-left: 12px !important;
- padding-right: 12px !important;
- }
- }
- .ios-footer a {
- color: #aaaaaa !important;
- text-decoration: underline;
- }
- </style>
- </head>
- <body style="margin:0; padding:0;" bgcolor="#F0F0F0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
- <!-- 100% background wrapper (grey background) -->
- <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0" bgcolor="#F0F0F0">
- <tr>
- <td align="center" valign="top" bgcolor="#F0F0F0" style="background-color: #F0F0F0;">
- <br>
- <!-- 600px container (white background) -->
- <table border="0" width="600" cellpadding="0" cellspacing="0" class="container" style="width:600px;max-width:600px">
- <tr>
- <td class="container-padding header" align="left" style="font-family:Helvetica, Arial, sans-serif;font-size:24px;font-weight:bold;padding-bottom:12px;color:#DF4726;padding-left:24px;padding-right:24px">
-
- </td>
- </tr>
- <tr>
- <td class="container-padding content" align="left" style="padding-left:24px;padding-right:24px;padding-top:12px;padding-bottom:12px;background-color:#ffffff">
- <br>
- <div class="title" style="font-family:Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;color:#374550">RESET YOUR PASSWORD</div>
- <br>
- <div class="body-text" style="font-family:Helvetica, Arial, sans-serif;font-size:14px;line-height:20px;text-align:left;color:#333333">
- Hi '.$row[1].',
- We were told that you forgot your password on Boneka Shop.<br>
- '.$row[1].'
- <br><br>
- Thanks,<br>
- Intive Studio.
- <br><br>
- </div>
- </td>
- </tr>
- <tr>
- <td class="container-padding footer-text" align="left" style="font-family:Helvetica, Arial, sans-serif;font-size:12px;line-height:16px;color:#aaaaaa;padding-left:24px;padding-right:24px">
- <br><br>
- <br><br>
- <br>
- <br><br>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </body>
- </html>
- ';
- /**
- * This example shows settings to use when sending via Google's Gmail servers.
- */
- //SMTP needs accurate times, and the PHP time zone MUST be set
- //This should be done in your php.ini, but this is how to do it if you don't have access to that
- date_default_timezone_set('Etc/UTC');
- require '../assets/phpmailer/PHPMailerAutoload.php';
- //Create a new PHPMailer instance
- $mail = new PHPMailer;
- //Tell PHPMailer to use SMTP
- $mail->isSMTP();
- //Enable SMTP debugging
- // 0 = off (for production use)
- // 1 = client messages
- // 2 = client and server messages
- $mail->SMTPDebug = 0;
- //Ask for HTML-friendly debug output
- $mail->Debugoutput = 'html';
- //Set the hostname of the mail server
- $mail->Host = 'smtp.gmail.com';
- //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
- $mail->Port = 587;
- //Set the encryption system to use - ssl (deprecated) or tls
- $mail->SMTPSecure = 'tls';
- //Whether to use SMTP authentication
- $mail->SMTPAuth = true;
- //Username to use for SMTP authentication - use full email address for gmail
- $mail->Username = "intives@gmail.com";
- //Password to use for SMTP authentication
- $mail->Password = "krisna23";
- //Set who the message is to be sent from
- $mail->setFrom('werkudara94@gmail.com', 'RESET YOUR PASSWORD');
- //Set an alternative reply-to address
- $mail->addReplyTo("sea_todo2016@gmail.com", 'RESET YOUR PASSWORD');
- //Set who the message is to be sent to
- $mail->addAddress("$lol", "$row[1]");
- //Set the subject line
- $mail->Subject = 'New To Do';
- //Read an HTML message body from an external file, convert referenced images to embedded,
- //convert HTML into a basic plain-text alternative body
- //$mail->msgHTML("$html");
- $mail->isHTML(true);
- $mail->Body = $html;
- //Replace the plain text body with one created manually
- //$mail->AltBody = 'This is a plain-text message body';
- //Attach an image file
- //$mail->addAttachment('images/phpmailer_mini.png');
- //send the message, check for errors
- if (!$mail->send()) {
- echo "<script>alert('Kami akan mengirimkan alamat untuk reset password ke email anda ".$row[0].".'); window.location='index.php'</script>";
- } else {
- echo "<script>window.location='index.php'</script>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement