PowerTCP Mail for .NET
Add(MimeAttachmentStream) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Attachments Class > Add Method : Add(MimeAttachmentStream) Method




attachment
The MimeAttachmentStream to add to the collection.
Inserts the specified MimeAttachmentStream into the collection as an attachment.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Add( _
   ByVal attachment As MimeAttachmentStream _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As Attachments
Dim attachment As MimeAttachmentStream
Dim value As Integer
 
value = instance.Add(attachment)
C# 
public int Add( 
   MimeAttachmentStream attachment
)
Managed Extensions for C++ 
public: int Add( 
   MimeAttachmentStream* attachment
) 
C++/CLI 
public:
int Add( 
   MimeAttachmentStream^ attachment
) 

Parameters

attachment
The MimeAttachmentStream to add to the collection.

Exceptions

ExceptionDescription
Dart.PowerTCP.Mail.InvalidParameterTypeExceptionattachment is not a MimeAttachmentStream.

Remarks

Use this method to add a MimeAttachmentStream (which represents a MIME attachment) to the MessageStream.Attachments collection. Since the Attachments collection actually reflects the MessageStream.Parts.Attachments collection, a new MimeAttachmentStream will be added to the MessageStream.Parts.Attachments collection and the Message.Attachments collection will reflect this. If any other type of Stream is added to the MessageStream.Attachments collection, an exception will be thrown.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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