I need to send an email using python and to bypass the TITUS CLASSIFICATION pop-up that comes up with the current script. The pop-up stops it from auto sending.
PYTHON
olMailItem = 0x0
obj = win32com.client.Dispatch("Outlook.Application")
newMail = obj.CreateItem(olMailItem)
newMail.Subject = "My Subject"
newMail.Body = "My Body"
newMail.To = "myemail@gmail.com"
newMail.send()
VBA
I have a VBA solution to auto send the email, but it would be easier and more intuitive to have everything in the PYTHON script rather than creating a VBA macro and calling it.
Dim AOMSOutlook As Object
Dim AOMailMsg As Object
Set AOMSOutlook = CreateObject("Outlook.Application")
Dim objUserProperty As Object
Dim OStrTITUS As String
Dim lStrInternal As String
Set AOMailMsg = AOMSOutlook.CreateItem(0)
Set objUserProperty = AOMailMsg.UserProperties.Add("TITUSAutomatedClassification", 1)
objUserProperty.Value = "TLPropertyRoot=ABCDE;Classification=For internal use only;Registered to:My Companies;"
With AOMailMsg
.To = "myemail@gmail.com"
.Subject = "My Subject"
.Body = "My Body"
.Send
End With
Set AOMailMsg = Nothing
Set objUserProperty = Nothing
Set AOMSOutlook = Nothing
Set lOMailMsg = Nothing
Set objUserProperty = Nothing
Set lOMSOutlook = Nothing
Any help greatly appreciated!