create_draft.Rd
Connect to Outlook and create an e-mail message.
create_draft( ol_app, addr_from = NULL, addr_to = NULL, addr_cc = NULL, subject = NULL, body_html = NULL, body_plain = NULL, attachments = NULL, use_signature = TRUE, show_message = TRUE )
ol_app | An object that represents an Outlook application instance (class: class `COMIDispatch.`) |
---|---|
addr_from | optional fields to fill |
addr_to | optional fields to fill |
addr_cc | optional fields to fill |
subject | optional fields to fill |
attachments | path to file(s) to attach |
use_signature | if TRUE, get the HTML signature from the new blank message, than put it back *after the plain text* after the message is created. |
show_message | if TRUE, show the message for editing after creation |
html_body | HTML contents of the message. Takes precedence over body |
body | plain text contents of the message |
a COM object that binds to an e-mail window (`'Outlook.MailItem'``)
if (FALSE) { com <- connect_outlook() msg <- create_draft(com, addr_to = "foo@bar.com") # Attachments msg <- create_draft(con, attachments = c('foo.txt', 'foo2.txt')) }