Файловый менеджер - Редактировать - /home/d46091/foodlicenceportal.net/client-email.php
Назад
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; $applicant_name = $_POST['applicant_name']; $mobile_number = $_POST['mobile_number']; $email_id = $_POST['email_id']; function generateRandomInvoice($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomInvoice = ''; for ($i = 0; $i < $length; $i++) { $randomInvoice .= $characters[rand(0, $charactersLength - 1)]; } return $randomInvoice; } //custom payment page// $rand = generateRandomInvoice(); $host_name = 'foodlicenceportal.net'; // $payment_link = 'https://'.$host_name.'/Payment.php?uFinVsiD='.$rand.'&name='.$applicant_name.'&mobileNumber='.$mobile_number.'&emailId='.$email_id; $payment_links = 'https://foodlicenceportal.net/Payment.php?cmpnMail='.base64_encode($orderId); // Mailer $website_name = strtoupper($host_name); $mail = new PHPMailer(true); try { $mail->isSMTP(); //$mail->SMTPDebug = 2; $mail->CharSet = 'UTF-8'; $mail->Host = $host_name; $mail->SMTPAuth = true; $mail->Username = 'no-reply@foodlicenceportal.net'; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@foodlicenceportal.net', $website_name); $mail->addAddress($_POST['email_id']); $mail->addBcc("udyogaadhaaronline.org@gmail.com"); $mail->isHTML(true); $mail->Subject = "⚠️Ref : Your ".$_POST['form_name']." Form"; $mail->Body = " <body class='clean-body u_body' style='margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #ffffff;color: #000000'> <table style='border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #ffffff;width:100%' cellpadding='0' cellspacing='0'> <tbody> <tr style='vertical-align: top'> <td style='word-break: break-word;border-collapse: collapse !important;vertical-align: top'> <div class='u-row-container' style='padding: 0px;background-color: transparent'> <div class='u-row' style='Margin: 0 auto;min-width: 320px;max-width: 650px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #dff1ff;'> <div style='border-collapse: collapse;display: table;width: 100%;background-color: #f8f8f8;'> <div class='u-col u-col-100' style='max-width: 320px;min-width: 650px;display: table-cell;vertical-align: top;'> <div style='width: 100% !important;'> <div style='padding: 0px;border-top: 10px solid #ed8433;;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 10px solid #ed8433;;'> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px 0px;font-family:sans-serif;' align='left'> <table width='100%' cellpadding='0' cellspacing='0' border='0'> <tr> <td style='padding-right: 0px;padding-left: 0px;' align='center'> <a href='#' style='cursor:default;'> <img align='center' border='0' src='https://foodlicenceportal.net/assets/images/fssai-logo.png' alt='Image' title='Image' style='outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 15%;max-width: 156px;' width='156'/></a> </td> </tr> </table> </td> </tr> </tbody> </table> <div style='padding: 0px;border-top: 0px solid #ed8433;;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 10px solid #ed8433;;'></div> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <div class='u-row-container' style='padding: 0px;background-color: transparent'> <div class='u-row' style='Margin: 0 auto;min-width: 320px;max-width: 650px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #f3fbfd;'> <div style='border-collapse: collapse;display: table;width: 100%;background-color: transparent;'> <div class='u-col u-col-100' style='max-width: 320px;min-width: 650px;display: table-cell;vertical-align: top;'> <div style='width: 100% !important;'> <div style='padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;'> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:40px 30px 10px;font-family:sans-serif;' align='left'> <div style='color: #1b262c; line-height: 140%; text-align: left; word-wrap: break-word;'> <p style='font-size: 14px; line-height: 140%;'><strong><span style='font-size: 15px;'>Dear <strong>".$_POST["applicant_name"]."</strong></span></strong></p> </div> </td> </tr> </tbody> </table> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px 30px 20px;font-family:sans-serif;' align='left'> <div style='color: #1b262c; line-height: 140%; text-align: justify; word-wrap: break-word;'> <p style='font-size: 13px; line-height: 140%; text-align: justify;'><span style='font-size: 16px; line-height: 22.4px;'>Thank you for submitting your application for ".$_POST["form_name"]." on our website.</span></p><br> <p style='font-size: 13px; line-height: 140%; text-align: justify;'><span style='font-size: 16px; line-height: 22.4px;'>This mail is an acknowledgement of successful submission of your application, however this mail does not confirm the payment status against the submitted application.</span></p><br> <p style='font-size: 13px; line-height: 140%; text-align: justify;'><span style='font-size: 16px; line-height: 22.4px;'>If you have already made payment, then please sit back and relax, your order will be queued up for processing. If any documents will be required, you will be intimated regarding the same on your registered email address.</span></p><br> <p style='font-size: 13px; line-height: 140%; text-align: justify;'><span style='font-size: 16px; line-height: 22.4px;'>If you have not yet made the payment, click on the link below to make the payment. Processing of your application will be done only after payment is confirmed.</span></p> <br> <div align='center'> <button style='text-align:left;background-color:#ed8433;;padding:10px 20px;border: none;'><a href='".$payment_links."' style='text-decoration:none; color:#fff;font-size:15px;font-family:sans-serif;cursor:pointer;'>Verify and Pay</a></button> </div> </div> </td> </tr> </tbody> </table> <!--<table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:sans-serif;' align='left'> <div align='center'> <button style='text-align:left;background-image:linear-gradient(to left,#ed8433;,#ed8433;);padding:10px 20px;border: none;'><a href='".$payment_links."' style='text-decoration:none; color:#fff;font-size:15px;font-family:sans-serif;cursor:pointer;'>Verify and Pay</a></button> </div> </td> </tr> </tbody> </table> --> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:18px 50px 50px;font-family:sans-serif;' align='left'> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <div class='u-row-container' style='padding: 0px;background-color: transparent'> <div class='u-row' style='Margin: 0 auto;min-width: 320px;max-width: 650px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background: #ed8433;;'> <div style='border-collapse: collapse;display: table;width: 100%;background-color: transparent;'> <div class='u-col u-col-100' style='max-width: 320px;min-width: 650px;display: table-cell;vertical-align: top;'> <div style='width: 100% !important;'> <div style='padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;'> <table style='font-family:sans-serif;' role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'> <tbody> <tr> <td style='overflow-wrap:break-word;word-break:break-word;padding:18px 30px;font-family:sans-serif;' align='left'> <div style='color: #ffffff; line-height: 140%; text-align: left; word-wrap: break-word;'> <p style='font-size: 13px; line-height: 140%;'><span style='font-size: 14px; line-height: 19.6px;'>Regards,<br> Team Processing,<br> For Order Status: <a href='mailto:order@foodlicenceportal.net' style='text-decoration:none;color: #fff !important;'>order@foodlicenceportal.net</a></span></p> </div> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> </td> </tr> </tbody> </table> </body> </html>"; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress("udyogaadhaaronline.org@gmail.com"); $mail->isHTML(true); $mail->Subject = "New Form Submitted For ".$_POST["form_name"].""; $mailBody = ''; foreach ($_POST as $key => $value) { if (!empty($value)) { $capitalizedKey = ucfirst($key); $mailBody .= "$capitalizedKey: $value<br>\n"; } } $mail->Body = $mailBody; if($mail){ $data = [ 'email_id' => $mail->Username, 'recipient_email' => $_POST['email_id'], 'amount' => $product_price, 'business' => 'FSSAI', 'mail_type' => 'Form Submission Mail', 'order_id' => $orderId, 'mailform' => 'sent' ]; $apiUrl = 'https://crm4.techlounge.co.in/api/mail-data-logs.php'; $ch = curl_init($apiUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); curl_close($ch); }else{ $data = [ 'email_id' => $mail->Username, 'recipient_email' => $_POST['email_id'], 'amount' => $product_price, 'business' => 'FSSAI', 'mailform' => 'notsent' ]; $apiUrl = 'https://crm4.techlounge.co.in/api/mail-data-logs.php'; $ch = curl_init($apiUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); curl_close($ch); } } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка