Python MAİL SENDER
by Mr_subProcess - Tuesday March 18, 2025 at 10:02 PM
#1
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email import encoders
#sender and receiever information
sender="Sender Mail"
receiever="Receiever Mail"
subject="subject"
message="Your message"
#Mail SMTP Server İnformation
smtp="smtp.gmail.com"
port=587
password="your password"
file_path=""#if you are not going to add a file path, leave it blank
#Creatw Mail object
mail = MIMEMultipart()
mail['From']=sender
mail['To']=receiever
mail['Subject']=subject
mail.attach(MIMEText(message, 'plain'))
def main():
    try:
        if  file_path:
            with open(file_path, "rb") as dosya:
                part = MIMEBase('application', 'octet-stream')
                part.set_payload(dosya.read())
                encoders.encode_base64(part)  # Dosyayı base64 olarak şifrele
                part.add_header('Content-Disposition', f'attachment; filename={file_path}')
       
                # Dosyayı e-postaya ekle
                mail.attach(part)
        server = smtplib.SMTP(smtp, port)
        server.starttls()  # TLS bağlantısı başlat
        server.login(sender, password)
        server.sendmail(sender, receiever, mail.as_string())
        print("Mail has been sent")
    except Exception as e:
        print("Error :" ,e)
main() :impossible: :impossible: :impossible: :impossible: :impossible:
Reply
#2
this is not good code...
Selling private web3/crypto vulnerabilities and data.
dm for simplex.
Reply
#3
(03-18-2025, 10:05 PM)xz9 Wrote: this is not good code...

It would be a great code if you set up and use your own SMTP server.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Script To Steal Any TikTok Username bs0d 302 14,646 1 hour ago
Last Post: saucymel
  Python open redirect checker cuteshiny 36 6,844 02-03-2026, 01:10 PM
Last Post: linyibaby
  [Python} Wordpress checker lord_x 155 23,244 02-03-2026, 01:07 PM
Last Post: diegofuckadona
  Gmail Valid Mail [PY] monkeyintown 0 115 12-30-2025, 05:18 PM
Last Post: monkeyintown
  Python tip - how to use proxy in exploit code Alegron125 0 218 04-01-2025, 12:55 AM
Last Post: Alegron125



 Users browsing this thread: 1 Guest(s)