ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Tool_Box/OutlookLib.py
(Generate patch)

Comparing Python/NinoCode/Tool_Box/OutlookLib.py (file contents):
Revision 632 by nino.borges, Mon Apr 3 19:21:49 2017 UTC vs.
Revision 637 by nino.borges, Wed Mar 28 20:17:13 2018 UTC

# Line 17 | Line 17 | class OutlookConnection:
17          self.outlookApp = win32com.client.Dispatch("Outlook.Application")
18          self.outlookEmailItem = 0x0
19  
20 <    def DraftEmail(self, emailTO, emailCC, emailSubject, emailBody, emailAttachment = None, bodyType = 'HTML'):
21 <        """Easy way to draft an email and wont send"""
20 >    def DraftEmail(self, emailTO, emailCC, emailSubject, emailBody, emailAttachment = None, bodyType = 'HTML', finishType = 'Display', savePath = None):
21 >        """Easy way to draft an email and wont send if you allow finishType as Display.  Can be changed to OFT, to save it instead."""
22          newEmailMessage = self.outlookApp.CreateItem(self.outlookEmailItem)
23          newEmailMessage.Subject = emailSubject
24          newEmailMessage.GetInspector
# Line 30 | Line 30 | class OutlookConnection:
30          newEmailMessage.Cc = emailCC
31          if emailAttachment:
32              newEmailMessage.Attachments.Add(Source=emailAttachment)
33 <        newEmailMessage.Display()
33 >        if finishType == 'OFT':
34 >            newEmailMessage.SaveAs(savePath)
35 >        else:
36 >            newEmailMessage.Display()
37          #newEmailMessage.send()

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)