Back
You can do that in Python, with the help of the below code:
SERVER = "smtp.example.com"FROM = "[email protected]"TO = ["listOfEmails"] # must be a listSUBJECT = "Subject"TEXT = "Your Text"# Prepare actual messagemessage = """From: %s\r\nTo: %s\r\nSubject: %s\r\n\%s""" % (FROM, ", ".join(TO), SUBJECT, TEXT)# Send the mailimport smtplibserver = smtplib.SMTP(SERVER)server.sendmail(FROM, TO, message)server.quit()
SERVER = "smtp.example.com"
FROM = "[email protected]"
TO = ["listOfEmails"] # must be a list
SUBJECT = "Subject"
TEXT = "Your Text"
# Prepare actual message
message = """From: %s\r\nTo: %s\r\nSubject: %s\r\n\
%s
""" % (FROM, ", ".join(TO), SUBJECT, TEXT)
# Send the mail
import smtplib
server = smtplib.SMTP(SERVER)
server.sendmail(FROM, TO, message)
server.quit()
Kindly refer to the below python tutorial that will help you out in a better way:
31k questions
32.8k answers
501 comments
693 users