Question
Accenture
NL
Last activity: 6 Nov 2018 20:02 EST
sending mail with an embedded image in body
using outlook component in pega robotics studio 8.0 , how can i send a mail with an embedded image.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
If you are embedding an image inside a message, then the message is likely an HTML format. You can call the NewMail method and generate a proxy from the result. This will be an OutlookMailItem. You can then set the BodyFormat property to HTML and pass the Body property your HTML code containing the image. You might also just use a text message and attach the image by calling the AddAttachment method, although it would not be embedded visually and would require a click to open.
The easiest way to generate the HTML is to manually create your message in Outlook and save it as a web page. Then you can copy the code generated out and re-use it in your solution.