html - MS Outlook 2013+ vbscript automatically create mail with inline image attachment -
i trying create html email message outlook automatically using vb script.
the process is:
- use outlook api create message.
- save message file.
- open outlook path saved message command-line parameter
the html body has reference in top image attached. so:
<img style='border:none' id="_x0000_i1025" src='cid:myident'>
i can attach image file mail using following code:
set oitem = outlook.createitem(0) ... set attach = oitem.attachments.add("path\to\img\email_topjs.jpg")
now have somehow link attachment cid:myident
i guessing have use propertyaccessor on attachment somehow. unable find documentation on far. (the link above deals message properties, not attachment properties)
i read page seems want using exchange web services, don't think methods available in outlook.
any clues appreciated.
is there way create email in outlook? creating plain-text file way sent smtp server , getting outlook open that?
i inherited script, , uses redemption plug-in, seems have been outdated recent outlook update. want native solution doesn't require plugin /dll.
you need set pr_attach_content_id property matching value:
attach.propertyaccessor.setproperty("http://schemas.microsoft.com/mapi/proptag/0x3712001f", "myident")
take @ messages , attachments outlookspy (click imessage button).
Comments
Post a Comment