Delete method

Official Content
This documentation is valid for:
Deletes, from the server, the last message that was received via the Receive method.  



Type Returned:


Extended Data Types: MAPISession, OutlookSession, POP3Session
Generators: .NET, .NET Framework, Java, Ruby (up to GeneXus X Evolution 3), Visual Basic (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)


  • MAPISession/OutlookSession: The deleted message will be moved to the “Deleted Items” folder.
  • POP3Session: The message is permanently deleted, and this is performed when the Logout is executed.
  • If the Receive method was not called, or if the last call did not return a message (for instance, due to an error), the call to Delete will result in Error 26.  
Note: This method returns an error code, so it is possible to call it as follows: &Err = &DataType.Delete()

See Also

Receive method
Send method
MAPISession Data Type
OutlookSession Data Type
POP3Session Data Type