Author | Topic: oPOP3:deletemessage(i) doesnt work. | |
---|---|---|
Anand Gupta | oPOP3:deletemessage(i) doesnt work. on Wed, 06 Mar 2002 16:04:07 +0530 Am playing with ASINET mail sample for the 1st time. in a test application (the sample which comes with ASINET) oPOP3:deletemessage(i) doesnt deletes the message from the server ?? Am I missing something? Anand using 1.7 Proffessional version. on Win98SE | |
Andreas Herdt | Re: oPOP3:deletemessage(i) doesnt work. on Wed, 06 Mar 2002 14:08:21 +0100 "Anand Gupta" <agATcoralindia.com> schrieb im Newsbeitrag news:3c85efd7@asgcom.alaska-software.com... > Am playing with ASINET mail sample for the 1st time. > > in a test application (the sample which comes with ASINET) > oPOP3:deletemessage(i) doesnt deletes the message from the server ?? > > Am I missing something? That depends on what you are doing. delete message does not actually delete the message. It marks the message for deletion. The message is actually deleted when the client disconnects from the server. Here this is working perfectly well hundred times the day. > > Anand > > using 1.7 Proffessional version. on Win98SE > > -- Andreas Herdt Alaska Software Technology AG ------------------------------------------------------------- Technical Support EMEA: mailto:support@de.alaska-software.com Technical Support APRA: mailto:support@us.alaska-software.com News Server: news://news.alaska-software.com Homepage: http://www.alaska-software.com ------------------------------------------------------------- | |
idep@istd.org | Re: oPOP3:deletemessage(i) doesnt work. on Fri, 08 Mar 2002 11:22:22 +0000 >> Am playing with ASINET mail sample for the 1st time. >> >> in a test application (the sample which comes with ASINET) >> oPOP3:deletemessage(i) doesnt deletes the message from the server ?? >> >> Am I missing something? > >That depends on what you are doing. > >delete message does not actually delete the message. It marks the message for deletion. >The message is actually deleted when the client disconnects from the server. > >Here this is working perfectly well hundred times the day. I had the same experience. When I disconnected and then reconnected, the messages were gone. This is in accordance I believe with the RFC which allows you to unmark a record marked for deletion, in a similar fashion to the recall statement in xBase. Regards, Phil Ide Xbase++ FAQ current release: 8, Monday 4th February 2002, 14:54 *** * Xbase++ FAQ: * online : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm * : www.software-braun.de/xbfaq/xbfaq.htm * download: http://www.idep.org.uk/xbase/xbfaq.zip * : www.software-braun.de/xbfaq/xbfaq.zip *** BRAIN, n. An apparatus with which we think what we think. That which distinguishes the man who is content to _be_ something from the man who wishes to _do_ something. A man of great wealth, or one who has been pitchforked into high station, has commonly such a headful of brain that his neighbors cannot keep their hats on. In our civilization, and under our republican form of government, brain is so highly honored that it is rewarded by exemption from the cares of office. - the Devil's Dictionary, Ambrose Bierce | |
Anand Gupta | Re: oPOP3:deletemessage(i) doesnt work. on Mon, 11 Mar 2002 17:12:17 +0530 Hi Phil and Andreas This is the exact code am using. TIA Anand ************ -------------- aMail := ReceiveMail('192.168.51.11','MyLogin','MyPass',.T.,1,,'MyLog.txt') FUNCTION ReceiveMail( cMailServer , cUsername ,cPassword ,lDeleteMail , nHowmany,acHeader cLogFile ) LOCAL oPop3, oMimeMsg, xTemp LOCAL aAllMails, aEMail, i, imax LOCAL oLog := LogWriter():new( cLogFile ) oPop3 := POP3Client():new( cMailServer,, cUsername, cPassword, oLog, 2 ) IF .NOT. oPop3:connect() oLog:logError( ERR_MSG_CONNECTION ) ENDIF IF oLog:isError() oPop3:disconnect() IF Valtype( cLogFile ) == "C" oLog:writeLogFile() ENDIF RETURN NIL ENDIF imax := oPop3:getNumberOfNewMessages() imax := Max( 0, Min( nHowMany, imax ) ) IF imax < 1 oPop3:disconnect() oLog:write( ERR_MSG_NOERROR ) IF Valtype( cLogFile ) == "C" oLog:writeLogFile() ENDIF RETURN {} ENDIF oLog:write( "Retrieving " + Var2Char( imax ) + " e-mails." ) aAllMails := {} FOR i := 1 TO imax oMimeMsg := oPop3:getMessage( i ) IF oMimeMsg != NIL aEMail := EMAIL_ARRAY AAdd( aAllMails, aEMail ) xTemp := oMimeMsg:getFrom() IF xTemp != NIL aEMail[ EMAIL_FROM ] := xTemp:getString() ELSE aEMail[ EMAIL_FROM ] := "No FROM!" ENDIF xTemp := oMimeMsg:getSubject() IF xTemp != NIL aEMail[ EMAIL_SUBJECT ] := xTemp ELSE aEMail[ EMAIL_SUBJECT ] := "No SUBJECT!" ENDIF xTemp := oMimeMsg:getHeader( "CC" ) IF xTemp != NIL aEMail[ EMAIL_CC ] := xTemp ELSE aEMail[ EMAIL_CC ] := "" ENDIF xTemp := oMimeMsg:getHeader( "BCC" ) IF xTemp != NIL aEMail[ EMAIL_BCC ] := xTemp ELSE aEMail[ EMAIL_BCC ] := "" ENDIF xTemp := oMimeMsg:getContent() IF xTemp != NIL GetMimeContent( aEMail, xTemp ) ENDIF ENDIF IF lDeleteMail oPop3:deleteMessage( i ) ENDIF NEXT oPop3:disconnect() IF .NOT. oLog:isError() oLog:write( ERR_MSG_NOERROR ) ENDIF IF Valtype( cLogFile ) == "C" oLog:writeLogFile() ENDIF RETURN aAllMails ************ "Phil Ide" <idep@istd.org> wrote in message news:3c889e8f.77266603@news.alaska-software.com... > >> Am playing with ASINET mail sample for the 1st time. > >> > >> in a test application (the sample which comes with ASINET) > >> oPOP3:deletemessage(i) doesnt deletes the message from the server ?? > >> > >> Am I missing something? > > > >That depends on what you are doing. > > > >delete message does not actually delete the message. It marks the message for deletion. > >The message is actually deleted when the client disconnects from the server. > > > >Here this is working perfectly well hundred times the day. > > I had the same experience. When I disconnected and then reconnected, > the messages were gone. This is in accordance I believe with the RFC > which allows you to unmark a record marked for deletion, in a similar > fashion to the recall statement in xBase. > > Regards, > > -- > Phil Ide > > Xbase++ FAQ > current release: 8, Monday 4th February 2002, 14:54 > *** > * Xbase++ FAQ: > * online : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm > * : www.software-braun.de/xbfaq/xbfaq.htm > * download: http://www.idep.org.uk/xbase/xbfaq.zip > * : www.software-braun.de/xbfaq/xbfaq.zip > *** > > BRAIN, n. An apparatus with which we think what we think. That which > distinguishes the man who is content to be something from the man > who wishes to do something. A man of great wealth, or one who has > been pitchforked into high station, has commonly such a headful of > brain that his neighbors cannot keep their hats on. In our > civilization, and under our republican form of government, brain is so > highly honored that it is rewarded by exemption from the cares of > office. > > - the Devil's Dictionary, Ambrose Bierce |