___ _ _ _ |_ | | | ( ) | | | | __ _ _ __ ___| | _|/ ___ __ _____| |__ | |/ _` | '__/ _ \ |/ / / __| \ \ /\ / / _ \ '_ \ /\__/ / (_| | | | __/ < \__ \ \ V V / __/ |_) | \____/ \__,_|_| \___|_|\_\ |___/ \_/\_/ \___|_.__/ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SENDMAIL.PY
--
--
This is my script which i use to send emails to the people who subscribe.
download scriptimport smtplib import urllib.request def sendmail(reciever): content = input("What do you want to send in your email? ") message = """From: From Jarek's web To: To you Subject: The web got some updates """ message = message + content mail = smtplib.SMTP('smtp.gmail.com', 587) mail.ehlo() mail.starttls() mail.login('your mail', 'your password') mail.sendmail('your mail', reciever, message) mail.close() def getfromweb(): response = urllib.request.urlopen('url of the file which contains the email adresses') #should be a text file with each email on a new line maillist = str(response.read()) maillist = maillist.split("\\n") sendmail(maillist) getfromweb() while True: a = str(input("Do you want to send another email?[y/n] ")) if a == ('y' or 'yes' or "1"): getfromweb() elif a == ('n' or 'no' or "0"): print("� Jarom�r �m�d 2018") raise SystemExit
--
BY JAREK
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------