PowerTCP Mail for .NET
AttachmentStream Constructor(FileStream)
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > AttachmentStream Class > AttachmentStream Constructor : AttachmentStream Constructor(FileStream)




content
The FileStream containing data from which an attachment will be created.
Initializes a new AttachmentStream with the file data contained in content.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal content As FileStream _
)
Visual Basic (Usage)Copy Code
Dim content As FileStream
 
Dim instance As New AttachmentStream(content)
C# 
public AttachmentStream( 
   FileStream content
)
Managed Extensions for C++ 
public: AttachmentStream( 
   FileStream* content
)
C++/CLI 
public:
AttachmentStream( 
   FileStream^ content
)

Parameters

content
The FileStream containing data from which an attachment will be created.

Remarks

Use this constructor if you wish to create an AttachmentStream from a file on disk, and you wish to have control over the FileStream used. Creating an Attachment in this manner would involve creating a FileStream initialized with file data. Pass this FileStream into the AttachmentStream constructor. You can then perform further action on the FileStream (such as closing the FileStream). If you would like to create a new AttachmentStream from a file without creating a FileStream, use the AttachmentStream(string) constructor.

When creating an AttachmentStream using this constructor, the AttachmentStream.FileName property will be everything after the last "/" OR "\\" ("\" in VB) in the FileStream.Name property.

When creating an AttachmentStream the data will always be read out as a Uuencoded attachment. For this reason, a new AttachmenStream will be created with AttachmentStream.MimeEncoding = ContentEncoding.Uuencode. Changing this property could result in incorrect message structure.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.