See Also

Attachments Class  | Attachments Members  | Overload List

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

C++

C++/CLI

Show All

attachment
The Stream to add to the collection.
fileName
The filename for the attachment.
See Also Languages PowerTCP Mail for .NET

Add(Stream,String) Method

Dart.PowerTCP.Mail Namespace > Attachments Class > Add Method : Add(Stream,String) Method

Inserts the specified Stream (must be a MimeAttachmentStream) into the collection as an attachment.

[Visual Basic]
Overloads Public Function Add( _    ByVal attachment As Stream, _    ByVal fileName As String _ ) As Integer
[C#]
public int Add(    Stream attachment,    string fileName );
[C++]
public: int Add(    Stream* attachment,    string* fileName )
[C++/CLI]
public: int Add(    Stream^ attachment,    String^ fileName )

Parameters

attachment
The Stream to add to the collection.
fileName
The filename for the attachment.

Exceptions

ExceptionDescription
InvalidParameterTypeExceptionattachment is not a MimeAttachmentStream.

Remarks

Use this method to add an Stream which is a MimeAttachmentStream (which represents a MIME attachment) to the 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

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Attachments Class  | Attachments Members  | Overload List


Send comments on this topic.

Documentation version 3.1.

© 2009 Dart Communications.  All rights reserved.