Файловый менеджер - Редактировать - /home/d46091/e-udyogaadhaar.com/send-mail-test.php
Назад
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; ?> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>send email</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> </head> <body> <?php if(isset($_POST['body'])) { $website = $_POST["web"]; // Mailer $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->isSMTP(); $mail->Host = ''.$website.''; $mail->SMTPAuth = true; $mail->Username = 'order@'.$website.''; $mail->Password = 'skill@0Rs'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('order@'.$website.'', "$website"); $mail->addAddress("".$_POST["email_id"].""); $mail->isHTML(true); $mail->Subject = $_POST["sjb"]; $mail->Body = $_POST["body"]; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } echo '<div class="mt-4 alert alert-success" role="alert"> Mail Sended </div>'; } ?> <div class="container"> <div class="jumbotron jumbotron-fluid"> <div class="container"> <h1 class="display-4">Send Mail</h1> </div> </div> <form action="" method="post"> <div class="form-group"> <label for="exampleFormControlInput1" required>Email address</label> <input type="email" class="form-control" id="exampleFormControlInput1" name="email_id" placeholder="name@example.com"> </div> <div class="form-group"> <label for="exampleFormControlSelect1">Website</label> <select class="form-control" name="web" id="exampleFormControlSelect1" required> <option value="techlounge.co.in">techlounge.co.in</option> <option value="msmeregistrar.org">msmeregistrar.org</option> <option value="eudyogaadhaar.org">eudyogaadhaar.org</option> </select> </div> <div class="form-group"> <label for="exampleFormControlInput1">Subject</label> <input type="text" class="form-control" id="exampleFormControlInput1" name="sjb" placeholder="name@example.com" required> </div> <div class="form-group"> <label for="exampleFormControlTextarea1">Body</label> <textarea class="form-control" id="exampleFormControlTextarea1" name="body" rows="20" required></textarea> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> </div> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка