| Visual Basic (Declaration) | |
|---|---|
Public Function New( _ ByVal htmlFileName As String _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim htmlFileName As String Dim instance As New MessageStream(htmlFileName) | |
| C# | |
|---|---|
public MessageStream( string htmlFileName ) | |
| Managed Extensions for C++ | |
|---|---|
public: MessageStream( string* htmlFileName ) | |
| C++/CLI | |
|---|---|
public: MessageStream( String^ htmlFileName ) | |
Parameters
- htmlFileName
- The HTML file to create a message from.
This constructor creates a MessageStream object, initializing it with HTML text and resources, creating a ready-to-send email message with a single line of code. Once created, altering the MessageStream object is not recommended.
When using this constructor, the file htmlFileName is scanned for resource links (such as the <img> tag specifying an image). These resources are added as MIME parts, and the actual HTML tag referencing the resource is modified to reference the resource within the message. The HTML text is stripped out and added as a text part for any email client that cannot read HTML formatted email.
If the HTML file contains any absolute links to resources on the Internet (for example, <img src="http://www.myserver.com/images/mypic.gif" /> they will be unable to be added. If an resource is unable to be added, no exception will be thrown.
Target Platforms: Microsoft .NET Framework 2.0