'cpnyStream is MemoryStream contains a image
'mailobj is the mail object
dim att as Attachment = new Attachment(cpnyStream, new System.Net.Mime.ContentType("image/png"))
att.Name = "companylogo.png"
att.ContentId = "111" 'Random number
mailobj.IsBodyHtml = true;
mailobj.Attachments.Add(at);
mailobj.Body = "<img src='cid:" + at.ContentId + "'>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment