I have followed the instructions for MailKit by Jeffrey Stedfast at MimeKit.net with further input from his helpful response to another Stack Overflow question to create an email with an embedded image. The result is that it saves space for the image but places the image at the end of the email as an attachment. Here is the code:
Dim clsSMTP = New MailKit.Net.Smtp.SmtpClient
clsSMTP.Connect("smtp.gmail.com", 587, False)
clsSMTP.Authenticate("[email protected]", "xxxxxxxxxx")
strMessage = "<!DOCTYPE html><html><body style='font-family:Verdana,Arial,Tahoma,Calibri,Neue Helvetica;font-size:11pt;font-weight:normal;font-style:italic'>" _
& "<table><tr><td style='width:300px'><img src='cid:mptIntro.ContentId' style='width:300px'/></td><td> </td>" _
& "<td><h1 style='font-size:16pt;font-weight:bold;'>Time for an Advent Study</h1></td></tr></table>"
bdyBuild = New BodyBuilder
strPathIntro = "C:/Users/xxx/xxxxx/Images/xxxxxxxxxx.jpg"
mptIntro = bdyBuild.LinkedResources.Add(strPathIntro)
mptIntro.ContentId = MimeKit.Utils.MimeUtils.GenerateMessageId()
mptIntro.ContentDisposition = New MimeKit.ContentDisposition(MimeKit.ContentDisposition.Inline)
strMember = "Me"
strAttendeeEmail = "[email protected]"
Dim mmgSpecial As New MimeMessage()
mmgSpecial.From.Add(New MailboxAddress("xxx xxxxx xxxxx", "[email protected]"))
mmgSpecial.To.Add(New MailboxAddress(strMember, strAttendeeEmail))
mmgSpecial.Subject = "Study Ideas"
bdyBuild.HtmlBody = strMessage
mmgSpecial.Body = bdyBuild.ToMessageBody()
clsSMTP.Send(mmgSpecial)
Thank you for any help.