Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Lianja) Find the "Sent" IMAP MailboxFind the "Sent" IMAP mailbox. Also finds the Junk and Trash mailboxes..
// This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. loImap = createobject("CkImap") loImap.Ssl = .T. loImap.Port = 993 llSuccess = loImap.Connect("imap.yourmailserver.com") if (llSuccess <> .T.) then ? loImap.LastErrorText release loImap return endif // Login or authenticate in some way.. llSuccess = loImap.Login("your_login","your_password") if (llSuccess <> .T.) then ? loImap.LastErrorText release loImap return endif // Get the list of mailboxes. lcRefName = "" lcWildcardedMailbox = "*" loMboxes = loImap.ListMailboxes(lcRefName,lcWildcardedMailbox) if (loImap.LastMethodSuccess = .F.) then ? loImap.LastErrorText release loImap return endif // The mailbox with the "/Sent" flag is the "Sent" mailbox. // Likewise for Junk and Trash.. i = 0 do while i < loMboxes.Count if (loMboxes.HasFlag(i,"\\Sent") = .T.) then ? "Sent mailbox: " + loMboxes.GetName(i) endif if (loMboxes.HasFlag(i,"\\Junk") = .T.) then ? "Junk mailbox: " + loMboxes.GetName(i) endif if (loMboxes.HasFlag(i,"\\Trash") = .T.) then ? "Trash mailbox: " + loMboxes.GetName(i) endif i = i + 1 enddo // Disconnect from the IMAP server. llSuccess = loImap.Disconnect() release loMboxes release loImap |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.