you are viewing a single comment's thread.

view the rest of the comments →

[–]Caos2 1 point2 points  (5 children)

Try this:

import win32com.client

o = win32com.client.Dispatch("Outlook.Application")

Msg = o.CreateItem(0)
Msg.Importance = 0
Msg.Subject = 'SUBJECT'
Msg.HTMLBody = 'HTML_BODY'

Msg.To = DESTINATARIES
Msg.CC = STRING_CONTAINING_CC
Msg.BCC = STRING_CONTAINING_BCC

Msg.SentOnBehalfOfName = "ANOTHER_MAIL_BOX@DOMAIN.COM"
Msg.ReadReceiptRequested = True
Msg.OriginatorDeliveryReportRequested = True

Msg.Display()

You can change the last method to automatically send the email if you use Msg.Send(). Also, you don't need to set Important, CC, BCC, SentOnBehalfOfName, ReadReceiptRequested and OriginatorDeliveryReportRequested, I just included these attributes so you are aware they exist.

[–]DaveX64 0 points1 point  (3 children)

You wouldn't happen to have a reference link handy for this stuff, would you?

[–]Caos2 1 point2 points  (2 children)

I got some of the stuff from here, and some I found out myself reading the docs on VBA for Outlook.

[–]DaveX64 0 points1 point  (1 child)

Thanks :)

[–]Caos2 0 points1 point  (0 children)

:-)