|
|
|
|
|
- Deleted messages (POP3 protocol)
- Deleted messages (Outlook messaging)
- Deleted messages (IMAP protocol)
- New messages (POP3 protocol)
EmailNbMessage (Function) In french: EmailNbMessage // Loop for reading all the incoming messages found // in the mailbox of POP3 protocol I is int nbMSG is int = EmailNbMessage(UserName) FOR I = 1 TO nbMSG EmailReadMessage(UserName) IF Email.Out <> True THEN CU.NAME = Email.Sender CU.MESSAGE_TXT = Email.Message ... ELSE Info("This message was deleted") END END
Syntax
Finding out the number of emails found on the email server (POP3 protocol) Hide the details
<Result> = EmailNbMessage(<POP3Â session>)
<Result>: Integer - Number of messages received on the server at the beginning of current email session,
- -1 if an error occurred. To get more details on the error, use ErrorInfo.
<POP3 session>: Character string Identifies the user session (POP3). This parameter can correspond to:
Finding out the number of emails found on the email server (IMAP protocol) Hide the details
<Result> = EmailNbMessage(<IMAP messaging session>)
<Result>: Integer - Number of messages received on the server in the current email session,
- -1 if an error occurred. To get more details on the error, use ErrorInfo.
<IMAP messaging session>: emailIMAPSession variable Identifier of the current email session (IMAP). This identifier is returned by EmailStartSession. Remarks Deleted messages (POP3 protocol) - EmailNbMessage returns the number of messages on the email server before they are deleted.
- the message numbers are not re-assigned.
Therefore, if four messages are found on the server at the beginning of session, these messages are numbered from 1 to 4. If message #1 is deleted: - EmailNbMessage used in the same session always returns 4.
- Message 1 cannot be read by EmailReadMessage because the message does not exist anymore (only messages 2, 3 and 4 exist).
The message numbers are re-assigned during the next connection. Deleted messages (IMAP protocol) If a message was deleted by EmailDeleteMessage, this message is actually deleted from the session: - during the next "expunge" command (clear the bin from a WebMail for example).
- when using EmailExpunge to force all the deleted emails to be destroyed.
New messages (POP3 protocol) The POP3 protocol cannot be used to find out and manage the new messages received during the connection. To get the new messages, you must disconnect ( EmailCloseSession) and reconnect ( EmailStartSession).
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|