Please can someone give me some pointers on how to send an email with MULTIPLE embedded images.
I can send a basic email and I can also send an email with an single embedded image using AlternateView,
In bodyText as XElement I have : <img src='cid:SCREENSHOT'/>
Then I add the alternative view like this:
Dim htmlContent As AlternateView = AlternateView.CreateAlternateViewFromString(bodyText.ToString(), Nothing, mediaType)
If (IO.File.Exists(screenshotPath)) Then
Dim screenshot As New LinkedResource(screenshotPath)
screenshot.ContentId = "SCREENSHOT"
htmlContent.LinkedResources.Add(screenshot)
End If
msg.AlternateViews.Add(htmlContent)`
I just cant work out how to get multiple images in there.
Many Thanks
Richard.
It involves 2 loops.
1 loop at the point of creatng the body.
Call this from BodyText using:
<%= CreateImages(imagePaths, hasCustImage) %>Another loop to create the Alternative views: