0 votes
1 view
in Python by (44.6k points)
How can we send an email using Python in outlook 2003?

1 Answer

0 votes
by (96.2k points)
edited by

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 list

SUBJECT = "Subject"

TEXT = "Your Text"

# Prepare actual message

message = """From: %s\r\nTo: %s\r\nSubject: %s\r\n\


""" % (FROM, ", ".join(TO), SUBJECT, TEXT)

# Send the mail

import smtplib

server = smtplib.SMTP(SERVER)

server.sendmail(FROM, TO, message)


Kindly refer to the below python tutorial that will help you out in a better way:


Related questions

0 votes
1 answer
asked Sep 25, 2019 in Python by Sammy (47.8k points)
0 votes
1 answer
+1 vote
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !