I am working on a project for a company intranet that requires an automatic HTML e-mail to be sent whenever a new note or an existing note is updated on an person's profile. The email should contain an image of the person. These images are stored on a server. I have managed to do this but problem is the code I have used does not allow me to resize the images to fit the e-mail formatting I have. If I try adding the style and border to the image tag in the code, it does not work. See code below. Any ideas?
Thanks
Thanks
Code:
Dim Mailer
Dim objCommand
Set Mailer = Server.CreateObject("CDO.Message")
Mailer.MimeFormatted = True
Mailer.To = "you@yourdomain.com"
Mailer.From = "you@yourdomain.com"
Mailer.Subject = "Updates to notes"
Mailer.HTMLBody = "<html><img src=""cid:personimage.jpg""></html>"
Set objCommand = Mailer.AddRelatedBodyPart(Server.MapPath("../images/personimage.jpg"), "personimage.jpg", CdoReferenceTypeName)
objCommand.Fields.Item("urn:schemas:mailheader:Content-ID") = "<personimage.jpg>"
objCommand.Fields.Update
Mailer.Send
Comment