| Visual Basic (Declaration) | |
|---|---|
Public Function New( _ ByVal html As Stream, _ ByVal baseDirectory As String _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim html As Stream Dim baseDirectory As String Dim instance As New MessageStream(html, baseDirectory) | |
| C# | |
|---|---|
public MessageStream( Stream html, string baseDirectory ) | |
| Managed Extensions for C++ | |
|---|---|
public: MessageStream( Stream* html, string* baseDirectory ) | |
| C++/CLI | |
|---|---|
public: MessageStream( Stream^ html, String^ baseDirectory ) | |
Parameters
- html
- The Stream containing HTML file data to create a message from.
- baseDirectory
- The base directory from which relative urls are computed.
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.
This constructor is provided if you have HTML data in memory that you wish to create an HTML email from.
The data within the Stream html is scanned for resource links (such as the <img> tag specifying an image). The baseDirectory parameter is the base directory from which relative urls are computed These resources (if found) are added as MIME parts, and the actual HTML tag referencing this 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 unchanged.
Target Platforms: Microsoft .NET Framework 2.0