🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1913

IMAP problem

#1913
From: Andre' Burke
Date: Tue, 03 Oct 2006 07:42
42 lines
1842 bytes
Hi all,

I am using Indy 9 on BDS 2006.
I have written an application that uses the TIdIMAP4 component to connect to 
an MS-Exchange mail server.
I am able to open a mailbox and retrieve a message from inside it but when I 
try to delete the message once I am finished with it, the DeleteMsgs method 
returns false.
The call to ExpungeMailBox is successful, but it doesnt do anything because 
the call to DeleteMsgs failed.


I am not sure if I am using the method correctly and I cannot find any 
examples on the internet.

I include a code snippet.

Regards,

Andre'

{
  if (!IdIMAP41->SelectMailBox("barney"))
  {
    Memo1->Lines->Add("Unable to access mailbox");
  }

  int ii[1];
  ii[0] = 1;
  if (IdIMAP41->DeleteMsgs(ii,1))
  {
    Memo1->Lines->Add("Message Deleted");
  }
  else
  {
    Memo1->Lines->Add("Unable to delete message");
  }
  if (!IdIMAP41->ExpungeMailBox())
  {
    Memo1->Lines->Add("Could not expunge mailbox");
  }
}
Technical Details
Message-ID: <45221456@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,df713b6bdeefcd62,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Andre' Burke" <no.spam@spam.no>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: IMAP problem
Date: Tue, 3 Oct 2006 09:42:14 +0200
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 196.38.124.67
Message-ID: <45221456@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1159861334 196.38.124.67 (3 Oct 2006 00:42:14 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail