Hi
I am using the following code to send html emails via outlook.
objOutlook = CreateObject("O utlook.Applicat ion")
objOutlookMsg = objOutlook.Crea teItem(Outlook. OlItemType.olMa ilItem)
fso = CreateObject("S cripting.FileSy stemObject")
ts = fso.OpenTextFil e(m_objParentFo rm.txtHtml.Text .ToString, 1)
eMessage = ts.ReadAll
With objOutlookMsg
eto = "Recepient@mydo mian.com"
objOutlookRecip = .Recipients.Add (eto)
objOutlookRecip .Type = Outlook.OlMailR ecipientType.ol To
.Subject = "My Subject"
.HTMLBody = eMessage
.Send()
End With
objOutlook = Nothing
The problem is that bodies of emails are coming out blank, where there
should be html read from file. What am I doing wrong?
Thanks
Regards
I am using the following code to send html emails via outlook.
objOutlook = CreateObject("O utlook.Applicat ion")
objOutlookMsg = objOutlook.Crea teItem(Outlook. OlItemType.olMa ilItem)
fso = CreateObject("S cripting.FileSy stemObject")
ts = fso.OpenTextFil e(m_objParentFo rm.txtHtml.Text .ToString, 1)
eMessage = ts.ReadAll
With objOutlookMsg
eto = "Recepient@mydo mian.com"
objOutlookRecip = .Recipients.Add (eto)
objOutlookRecip .Type = Outlook.OlMailR ecipientType.ol To
.Subject = "My Subject"
.HTMLBody = eMessage
.Send()
End With
objOutlook = Nothing
The problem is that bodies of emails are coming out blank, where there
should be html read from file. What am I doing wrong?
Thanks
Regards
Comment