• Loading...
UltimateMail
Undelete Method
See Also  Example Send comments on this topic to ATP, Inc.
Atp.Net.Mail Namespace > Pop3Client Class : Undelete Method




Undelete messages - unmarks any messages that have been marked as deleted.

Syntax

Visual Basic (Declaration) 
Public Sub Undelete() 
Visual Basic (Usage)Copy Code
Dim instance As Pop3Client
 
instance.Undelete()
C# 
public void Undelete()
Managed Extensions for C++ 
public: void Undelete(); 
C++/CLI 
public:
void Undelete(); 

Example

C#Copy Code
using Atp.Net;
using Atp.Net.Mail;

namespace Samples.Pop3
{
   
class UndeleteMessage
   {
       
static void Main()
       {
           
// POP3 server information.
           
const string serverName = "myserver";
           
const string user = "name@domain.com";
           
const string password = "mytestpassword";
           
const int port = 995;
           
const SecurityMode securityMode = SecurityMode.Implicit;

           
// Create a new instance of the Pop3Client class.
           
Pop3Client client = new Pop3Client();

           
// Connect to the server.
           
client.Connect(serverName, port, securityMode);

           
// Login to the server.
           
client.Authenticate(user, password);

           
// Delete a mail message with sequence number 1.
           
client.Delete(1);

           
// ...

           
// Undelete all messages.
           
client.Undelete();

           
// Close the connection.
           
client.Disconnect();
       }
   }
}
Visual BasicCopy Code
Imports Atp.Net
Imports Atp.Net.Mail

Module Pop3UndeleteMessage
    Sub Main()
        ' POP3 server information.
        Const serverName As String = "myserver"
        Const user As String = "name@domain.com"
        Const password As String = "mytestpassword"
        Const port As Integer = 995
        Const securityMode As SecurityMode = securityMode.Implicit

        ' Create a new instance of the Pop3Client class.
        Dim client As New Pop3Client()

        ' Connect to the server.
        client.Connect(serverName, port, securityMode)

        ' Login to the server.
        client.Authenticate(user, password)

        ' Delete a mail message with sequence number 1.
        client.Delete(1)

        ' ...

        ' Undelete all messages.
        client.Undelete()

        ' Close the connection.
        client.Disconnect()
    End Sub
End Module

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

ATP, Inc. is a Microsoft Partner. Our components are compatible with Windows 7 and optimized for Visual Studio