| 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
) | Exception | Description |
|---|---|
| InvalidParameterTypeException | attachment is not a MimeAttachmentStream. |
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.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Attachments Class | Attachments Members | Overload List
Send comments on this topic.
Documentation version 3.1.
© 2009 Dart Communications. All rights reserved.