|
|
|
|
Creating and sending HTML email in Visual Basic - Part 2
Home » Visual Basic » Miscellaneous
Creating and sending HTML email in Visual Basic - Part 2
This tutorial briefly explains how to import HTML file into the message body and automatically attach pictures and other objects this HTML file depends on.
Creating and sending HTML email in Visual Basic - Part 2
by: AfterLogic
Importing HTML file into message body
This tutorial briefly explains how to import HTML file into the message body and automatically attach pictures and other objects this HTML file depends on using AfterLogic's MailBee SMTP component in Visual Basic.
Tutorial map:
Part 1 - Sending simple HTML e-mail
Part 2 - Importing HTML file into message body
Part 3 - Assembling body text from different sources
Part 4 - Building alternative message body
Part 5 - Advanced topics
Message.ImportBodyText method reads content of the file specified in FilePath parameter into the message body. This is the only required parameter of ImportBodyText method.
Because message body may have various formats (usually plain-text and HTML), ImportBodyText also supports optional parameter HTMLImport that denotes whether to treat the content as plain-text or as HTML.
If HTMLImport=False (this is default value), the file content is just copied into message body and the body is marked as plain-text.
If used for importing HTML (HTMLImport=True), the body is marked as HTML, and ImportBodyText method also parses imported HTML document looking for any objects related to the document (such as images, scripts and stylesheets). Every object found is appended to the message as inline attachment.
|
More Tutorials by this user
|
|
|
|
|
|
|
|
|