2

Hi there I have been looking a bit more advanced coding for editing and sending a email:

SERVER = "your.mail.server"
FROM = "yourEmail@yourAddress.com"
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()

However, I want to have the user selecting an email address to send from a dropdown list. And I want it to use the oft:

mail.Open('Template1.oft')

and edit it before send it with user input. Is there anything like this? I have been looking with no success.

cheers MK

MarKris
  • 21
  • 1

0 Answers0