|
|
|
|
|
EmailSeekFirst (Function) In french: EmailCherchePremier Finds one or more emails according to the criteria specified in the messaging software (Outlook, messaging software using the IMAP protocol, ...). This search is performed in the current Outlook folder. Reminder: This function does not allow you to search for one or more emails in Outlook Express. MySession is emailIMAPSession MyEmail is Email ... // Find the emails containing "PC Soft" // in the message subject or body // Only the incoming emails are taken into account IF EmailSeekFirst(MySession, MyEmail, emailSubject + emailBody, ... "PC Soft") = True THEN // Enumerate the emails found WHILE MyEmail.Out = False // Displays the sender and subject in a Table control TableAdd(TABLE_EmailFound, Email.Sender + ... TAB + MyEmail.Subject) // Next email found EmailReadNext(MySession, MyEmail) END ELSE Info("No email was found") END
Syntax
Seeking in an Email variable Hide the details
<Result> = EmailSeekFirst(<Session> , <Email> , <Email section> , <Search value> [, <Read mode>])
<Result>: Boolean - True if one or more emails have been found,
- False otherwise. If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo with the errMessage constant.
If no email was found, ErrorOccurred remains set to False and the Email.Out variable is set to True.
<Session>: Integer, or emailOutlookSession or emailIMAPSession variable The session can be: <Email>: Email variable Message in which the search will be performed. <Email section>: Integer constant (or combination of constants) Email section where the <Sought Value> will be sought: | | emailBody | Body of emails. | emailMessageID | Identifier of emails. | emailRecipient | Recipients of emails. | emailSender | Senders of emails. | emailSubject | Subjects of emails. |
These constants can be combined. <Search value>: Character string Value sought in the emails. <Read mode>: Optional constant or character string Indicates the messages that will be read: | | emailAll or "ALL" (Default value) | The search is performed in the read emails and in the unread emails. | emailUnread or "UNREAD" | The search is performed in the unread emails only. |
Seeking in the Email structure Hide the details
<Result> = EmailSeekFirst(<Session> , <Email section> , <Search value> [, <Read mode>])
<Result>: Boolean - True if one or more emails have been found,
- False otherwise. If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo with the errMessage constant.
If no email was found, ErrorOccurred remains set to False and the Email.Out variable is set to True.
<Session>: Character string, integer, or emailOutlookSession or emailIMAPSession variable The session can be: <Email section>: Integer constant (or combination of constants) Email section where the <Sought Value> will be sought: | | emailBody | Body of emails. | emailMessageID | Identifier of emails. | emailRecipient | Recipients of emails. | emailSender | Senders of emails. | emailSubject | Subjects of emails. |
These constants can be combined. <Search value>: Character string Value sought in the emails. <Read mode>: Optional constant or character string Indicates the messages that will be read: | | emailAll or "ALL" (Default value) | The search is performed in the read emails and in the unread emails. | emailUnread or "UNREAD" | The search is performed in the unread emails only. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|