Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import win32com.client as win32
- def Emailer(subject, recipient, auto=True):
- outlook = win32.Dispatch('outlook.application')
- mail = outlook.CreateItem(0)
- mail.To = recipient
- mail.CC = recipientCC
- mail.Subject = subject
- #mail.HtmlBody="test"
- fo = open("save_out_alarm.txt", "r")
- text = fo.read()
- List_tesx=text.split("\n")
- for line in List_tesx:
- mail.HtmlBody=line
- if auto:
- mail.Display(True)
- else:
- mail.open # or whatever the correct code is
- Emailer(subject, recipient, recipientCC)
Advertisement
Add Comment
Please, Sign In to add comment