How to send the mail using sendoutlook mail with dynamic content?

Hi,

Please go through this link.
Embed Image in Outlook Email
To send random image you can follow the below steps.

  1. Directory.getFiles(“Local Folder path”) to get all image files and convert String to list.
  2. Generate a random number as randomNum between 0 and number of files in local directory.
  3. Get the file path at index from the list using list.Item(randomNum)
  4. Embed your image in email present at filePath.
1 Like