E-mail POP3: GET LIST - < email_pop3_getlist >() ... [Pro]
E-mail POP3: GET LIST <email_pop3_getlist>("Connection Id","Variable receiving number of e-mails","Variable array with e-mail senders","Variable array with e-mail subjects") Available in: Professional edition
|
This command retrieves list of messages waiting on POP3 e-mail account. Before command can be called a connection to the e-mail account needs to be opened using command.
|
#
|
Parameter name
|
Parameter description
|
1
|
Connection Id
|
An identifier of connection to the e-mail account. Connection is opened using command.
|
2
|
Variable receiving number of e-mails
|
Variable that receives number of e-mail messages waiting on e-mail account.
|
3
|
Variable array with e-mail senders
|
Variable that receives number of e-mail messages waiting on e-mail account.
|
4
|
Variable array with e-mail subjects
|
Variable (array) that receives "subject" field of a waiting e-mail message.
|
|
|
Example (Macro Steps):
|
1
|
<#> <#> Thic sample shows how to get list of e-mails received on POP3 account.
|
2
|
Macro execution: ONLY COMMANDS
|
3
|
<#> <#> Connect to POP3 account first:
|
4
|
E-mail POP3: CONNECT Server=myemails.com, Login name=myaccount, Password=737qw7523#$, Connection Id = POP3Connection, Port = , TLS/SSL =
|
5
|
<#> <#> Get list of messages then:
|
6
|
E-mail POP3: GET LIST Connection Id = "POP3Connection", Variable receiving number of e-mails = "vNumberOfMessages", Variable array with e-mail senders = "vMessages_From", Variable array with e-mail subjects = "vMessages_Subject"
|
7
|
<#> <#> Disconnect from the account:
|
8
|
E-mail POP3: DISCONNECT Connection Id = POP3Connection
|
9
|
<#> <#> Show the list of messages:
|
10
|
IF NUMERIC vNumberOfMessages > 0
|
11
|
Variable SET "vEmailsList=_vStrEmpty", Message text=""
|
12
|
Repeat steps UNTIL "vEmails < vNumberOfMessages" (Counter variable initial value = "vEmails=0", Counter loop increment = "1")
|
13
|
Variable OPERATION "STR_APPEND" (Variable for result = vEmailsList, Input text/variable = %vEmailsList%, Parameter 1 = vMessages_Subject[vEmails], Parameter 2 = , Parameter 3 = 0)
|
14
|
Variable OPERATION "STR_APPEND" (Variable for result = vEmailsList, Input text/variable = %vEmailsList%, Parameter 1 = %_vKeyNewLine%, Parameter 2 = , Parameter 3 = 0)
|
15
|
Repeat steps END
|
16
|
Message SHOW "Information" : "%vEmailsList%" (other parameters: x = -100, y = -100, Window title = Emails received, Buttons = OK, Timeout (seconds) = 0, Always on top = ).
|
17
|
ELSE activate
|
18
|
Message SHOW "Error" : "There are no e-mails received." (other parameters: x = -100, y = -100, Window title = Emails received, Buttons = OK, Timeout (seconds) = 0, Always on top = ).
|
19
|
ENDIF
|
|
Example (Plain Text):
<#> Thic sample shows how to get list of e-mails received on POP3 account.
<cmds>
<#> Connect to POP3 account first:
<email_pop3_connect>("myemails.com","myaccount","737qw7523#$","POP3Connection")
<#> Get list of messages then:
<email_pop3_getlist>("POP3Connection","vNumberOfMessages","vMessages_From","vMessages_Subject")
<#> Disconnect from the account:
<email_pop3_disconnect>("POP3Connection")
<#> Show the list of messages:
<if_num>("vNumberOfMessages > 0")
<varset>("vEmailsList=_vStrEmpty","")
<for>("vEmails=0","vEmails < vNumberOfMessages","1")
<var_oper>(vEmailsList,"%vEmailsList%",STR_APPEND,"vMessages_Subject[vEmails]","", "0")
<var_oper>(vEmailsList,"%vEmailsList%",STR_APPEND,"%_vKeyNewLine%","", "0")
<for_end>
<msg>(-100,-100,"%vEmailsList%","Emails received",1,0,0)
<else>
<msg>(-100,-100,"There are no e-mails received.","Emails received",1,0,2)
<endif>