Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- EMAIL = 'assistant@astro-practic.ru'
- EMAIL_HOST = 'smtp.beget.com'
- EMAIL_HOST_USER = EMAIL # EMAIL.split('@')[0]
- EMAIL_HOST_PASSWORD = 'Admin111'
- SUBJECT = "Test email from Python"
- BODY = "\r\n".join((
- "From: %s" % EMAIL,
- "To: %s" % '',
- "Subject: %s" % SUBJECT ,
- "",
- 'none'
- ))
- # server.starttls()
- server = smtplib.SMTP_SSL(EMAIL_HOST, 465) # 25 port
- r = server.login(EMAIL_HOST_USER, EMAIL_HOST_PASSWORD)
- server.sendmail(EMAIL, ['digital-mag@ya.ru', 'lebedeva.olga.alex@yandex.ru'], BODY)
- server.quit()
- print('ok')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement