Convert HTML Message with Image
-
- Senior user
- Posts: 843
- Joined: 2016-12-08 02:21
Convert HTML Message with Image
Anyone have code written for a handler to insert a MIME attached image into the message HTML body as inline?
Re: Convert HTML Message with Image
good old CDOSYS canmikedibella wrote: ↑2024-08-28 19:12Anyone have code written for a handler to insert a MIME attached image into the message HTML body as inline?
Code: Select all
Set myMail=CreateObject("CDO.Message")
myMail.Subject= "Subject of Email"
myMail.From= "from@site.com"
myMail.To= "to@site.com"
myMail.CreateMHTMLBody "http://www.mysite.com/email.html"
strImagePath = Server.MapPath("\") & "\images\mypic1.jpg"
myMail.AddRelatedBodyPart strImagePath, "my_pic_1", 0
strImagePath = Server.MapPath("\") & "\images\mypic2.jpg"
myMail.AddRelatedBodyPart strImagePath, "my_pic_2", 0
myMail.Send
set myMail=nothing
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup