little change in script emailSender.py
This commit is contained in:
@@ -8,12 +8,20 @@ from dotenv import load_dotenv
|
|||||||
# for importing files
|
# for importing files
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# we can use variable with list of email adress for msg['To'] for receivers
|
||||||
|
# receiver = ["misij83692@carsik.com",]
|
||||||
|
|
||||||
|
|
||||||
msg = EmailMessage()
|
msg = EmailMessage()
|
||||||
# Subject should be dinamicly to add subject from olx
|
# Subject should be dinamicly to add subject from olx
|
||||||
msg['Subject'] = 'KIVI-CARS'
|
msg['Subject'] = 'KIVI-CARS'
|
||||||
msg['From'] = 'kivi-cars.ba'
|
msg['From'] = 'kivi-cars.ba'
|
||||||
# Below is generated email adress using https://temp-mail.org/
|
# Below is generated email adress using https://temp-mail.org/
|
||||||
msg['To'] = 'harogi8832@leafzie.com'
|
msg['To'] = ["girolag234@eosbuzz.com","tojebik898@3dinews.com"]
|
||||||
msg_body = """Pozdrav,
|
msg_body = """Pozdrav,
|
||||||
Ovo je automatski generisana poruka u svrhu testiranja naseg servisa
|
Ovo je automatski generisana poruka u svrhu testiranja naseg servisa
|
||||||
Vaš Kivi-cars tim! """
|
Vaš Kivi-cars tim! """
|
||||||
@@ -26,8 +34,6 @@ sender = os.getenv("EMAIL_HOST_USER")
|
|||||||
password = os.getenv("EMAIL_HOST_PASSWORD")
|
password = os.getenv("EMAIL_HOST_PASSWORD")
|
||||||
host = os.getenv("EMAIL_HOST")
|
host = os.getenv("EMAIL_HOST")
|
||||||
port = os.getenv("EMAIL_PORT")
|
port = os.getenv("EMAIL_PORT")
|
||||||
receiver = "harogi8832@leafzie.com"
|
|
||||||
|
|
||||||
|
|
||||||
server = smtplib.SMTP(host, port)
|
server = smtplib.SMTP(host, port)
|
||||||
server.starttls()
|
server.starttls()
|
||||||
|
|||||||
Reference in New Issue
Block a user