Hi to all,
I am using the code below to e-mail a sales receipt to my customers. I am creating an HTML page from my SQL database and then saving that to file. I then read the file and place that as the HTML body.
The issue is that not all my users will have access to the internet and I want to display the Images to them as well. At the moment the images are just referenced in the html page. How can I include them?
Public Shared Sub NewCustEmail(ByVal EmailAddress As String _
, ByVal ReceiptSaveLoc As String)
Dim outlookapp As Outlook.Application = New Outlook.Application
Dim outBoxfolder As Outlook.MAPIFolder = outlookapp.GetNamespace("MAPI").GetDefaultFolder _
Dim mailItem As Outlook.MailItem = outBoxfolder.Items.Add(Outlook.OlItemType.olMailItem)
mailItem.Subject = "On-line Order Confirmation"
Dim EmailBody As String = System.IO.File.ReadAllText(ReceiptSaveLoc)
mailItem.BodyFormat = Outlook.OlBodyFormat.olFormatHTML
mailItem.HTMLBody = EmailBody
mailItem.To = EmailAddress
outlookapp = Nothing
Catch ex As Exception