Configure email send using SMTP SSL/Port 465 on Python.(Redmail)

45 Views Asked by At
from redmail import EmailSender
from smtplib import SMTP_SSL

email = EmailSender(
    host="smtp-es.securemail.pro",
    port=465,
    cls_smtp=SMTP_SSL,
    username= "xxxxxxxxx",
    password= "zzzzzzzzz" 
)

email.send(
    subject="An example email",
    sender="xxxxxxxxxxx",
    receivers=['[email protected]'],
    text="Hello!",
    html="<h1>Hello!</h1>"
)    

I dont really know what to put on the EmailSender(), I tried the 5 parameters you see, little bit sure about the first three, completely no idea about the last two.

0

There are 0 best solutions below