PowerTCP Mail for .NET
Save(String,Boolean) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > AttachmentStream Class > Save Method : Save(String,Boolean) Method




fileName
The name of the file to save the attachment to.
overwrite
Specifies if the destination file should be overwritten.
Saves the attachment.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Save( _
   ByVal fileName As String, _
   ByVal overwrite As Boolean _
) As String
Visual Basic (Usage)Copy Code
Dim instance As AttachmentStream
Dim fileName As String
Dim overwrite As Boolean
Dim value As String
 
value = instance.Save(fileName, overwrite)
C# 
public string Save( 
   string fileName,
   bool overwrite
)
Managed Extensions for C++ 
public: string* Save( 
   string* fileName,
   bool overwrite
) 
C++/CLI 
public:
String^ Save( 
   String^ fileName,
   bool overwrite
) 

Parameters

fileName
The name of the file to save the attachment to.
overwrite
Specifies if the destination file should be overwritten.

Remarks

This method saves the attachment to the file specified by fileName. If overwrite is true, any file with the same name and path is overwritten.

If overwrite is false, it will try for up to 16 times to create a file with a number on the end. If it can't make any of those without overwriting, it creates a unique name based on the date and time appended on to the end of the filename but before the extension (in the format file(date time).txt).

This method reads data until 0 bytes are returned, indicating the end of the stream.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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