Add images in the SMTP mail body

Create any variable1 (Type as string) for storing image name “test.png”

Create any variable2 (Type as string) to store the html code: “<img src=”“data:image/png;base64,tobeReplaced”“alt=”“Red dot”“>”

Create any variable3 (Type as byte) to assign System.IO.File.ReadAllBytes(variable1) for reading the image.

Create any variable4 (Type as string) to assign Convert.ToBase64String(variable3)

In the assign activity for variable2 replace the variable2 with value as variable2.Replace(“tobeReplaced”, variable4)

Pass the variable2 in the body field of the SMTP activity.

You will get the image in the body of the SMTP activity.

Small edits, create variable4 as Generic Value

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.