PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Deleted messages (POP3 protocol)
  • Deleted messages (Outlook messaging)
  • Deleted messages (IMAP protocol)
  • New messages (POP3 protocol)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the number of incoming messages currently found:
  • on the email server (POP3 and IMAP protocol).
    • POP3 protocol: This number of messages remains constant during the entire email session, even if new emails are received or if emails are deleted by EmailDeleteMessage.
    • IMAP protocol: This number of messages evolves according to the incoming emails or to the emails actually deleted from the email server (via an "expunge" commande (clear the bin from a WebMail for example).IMAP protocol: This number of messages evolves according to the incoming emails or to the emails actually deleted from the email server (via an "expunge" commande, clear the bin from a WebMail for example). You also have the ability to force the destruction of all deleted emails via EmailExpunge.
  • WINDEVWEBDEV - Server code in the Outlook messaging software. This number of messages evolves according to the emails received or deleted by EmailDeleteMessage.
  • WINDEVWEBDEV - Server code in the Notes messaging software. This number of messages evolves according to the emails received or deleted by EmailDeleteMessage.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 22 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
New in version 22
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
// 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(<Session>)
<Result>: Integer
  • Number of messages received on the server at the beginning of current email session,
  • -1 if an error occurred. To find out the error details, use ErrorInfo.
<Session>: Character string
Identifies the user session. This parameter can correspond to:
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUser code (UMC)

Finding out the number of emails found in the Outlook messaging software Hide the details

<Result> = EmailNbMessage(<Session>)
<Result>: Integer
  • Number of incoming messages found in the Outlook messaging software during the call to EmailNbMessage,
  • -1 if an error occurred. To find out the error details, use ErrorInfo.
<Session>: Integer or emailOutlookSession variable
Identifier of current email session. This parameter can correspond to:
Versions 15 and later
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUser code (UMC)

Finding out the number of emails found on the Notes messaging software Hide the details

<Result> = EmailNbMessage(<Session>)
<Result>: Integer
  • Number of incoming messages found in the Notes messaging software during the call to EmailNbMessage,
  • -1 if an error occurred. To find out the error details, use ErrorInfo.
<Session>: emailNotesSession variable
Identifier of current email session.
New in version 15
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUser code (UMC)

Finding out the number of emails found on the Notes messaging software Hide the details

<Result> = EmailNbMessage(<Session>)
<Result>: Integer
  • Number of incoming messages found in the Notes messaging software during the call to EmailNbMessage,
  • -1 if an error occurred. To find out the error details, use ErrorInfo.
<Session>: emailNotesSession variable
Identifier of current email session.
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUser code (UMC)

Finding out the number of emails found on the Notes messaging software Hide the details

<Result> = EmailNbMessage(<Session>)
<Result>: Integer
  • Number of incoming messages found in the Notes messaging software during the call to EmailNbMessage,
  • -1 if an error occurred. To find out the error details, use ErrorInfo.
<Session>: emailNotesSession variable
Identifier of current email session.
Versions 15 and later

Finding out the number of emails found on the email server (IMAP protocol) Hide the details

<Result> = EmailNbMessage(<Session Identifier>)
<Result>: Integer
  • Number of messages received on the server in the current email session,
  • -1 if an error occurred. To find out the error details, use ErrorInfo.
<Session Identifier>: emailIMAPSession variable
Identifier of current email session. This identifier is returned by EmailStartSession.
New in version 15

Finding out the number of emails found on the email server (IMAP protocol) Hide the details

<Result> = EmailNbMessage(<Session Identifier>)
<Result>: Integer
  • Number of messages received on the server in the current email session,
  • -1 if an error occurred. To find out the error details, use ErrorInfo.
<Session Identifier>: emailIMAPSession variable
Identifier of current email session. This identifier is returned by EmailStartSession.

Finding out the number of emails found on the email server (IMAP protocol) Hide the details

<Result> = EmailNbMessage(<Session Identifier>)
<Result>: Integer
  • Number of messages received on the server in the current email session,
  • -1 if an error occurred. To find out the error details, use ErrorInfo.
<Session Identifier>: emailIMAPSession variable
Identifier of current email session. This identifier is returned by EmailStartSession.
Remarks

Deleted messages (POP3 protocol)

If a message was deleted by EmailDeleteMessage:
  • EmailNbMessage returns the number of messages found on the email server before the deletion.
  • 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 the 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.
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileUser code (UMC)

Deleted messages (Outlook messaging)

In the same email session, if a message was deleted by EmailDeleteMessage, EmailNbMessage returns the correct number of messages found in the incoming email folder.

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).
  • Versions 20 and later
    When using EmailExpunge to force all the deleted emails to be destroyed.
    New in version 20
    When using EmailExpunge to force all the deleted emails to be destroyed.
    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).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Java wd230java.jar
Linux wd230com.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment