E-mail POP3: GET E-MAIL - < email_pop3_getmail >() ... [Pro]
E-mail POP3: GET E-MAIL <email_pop3_getmail>("Connection Id","E-mail number","Variable receiving sender","Variable receiving subject","Variable receiving body") Available in: Professional edition
|
This command retrieves defined message waiting on POP3 e-mail account. Before command can be called a connection to the e-mail account needs to be opened using command. In addition, it is always good to check for the e-mail existence using before retrieving the particular e-mail using the command.
|
#
|
Parameter name
|
Parameter description
|
1
|
Connection Id
|
An identifier of connection to the e-mail account. Connection is opened using command.
|
2
|
E-mail number
|
Message number (index) to get. The first e-mail message has number "0", the second one has "1" and so on....
|
3
|
Variable receiving sender
|
Variable that receives "from" field of the e-mail message.
|
4
|
Variable receiving subject
|
Variable that receives "subject" field of the e-mail message.
|
5
|
Variable receiving body
|
Variable that receives "body" field of the 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 number of messages:
|
6
|
E-mail POP3: GET LIST Connection Id = "POP3Connection", Variable receiving number of e-mails = "vNumOfMessages", Variable array with e-mail senders = "", Variable array with e-mail subjects = ""
|
7
|
<#> <#> Are there some messages?
|
8
|
IF NUMERIC vNumOfMessages > 0
|
9
|
<#> <#> Yes, so let's get the first one:
|
10
|
E-mail POP3: GET E-MAIL Connection Id = "POP3Connection", E-mail number = "0", Variable receiving sender = "vFrom", Variable receiving subject = "vSubject", Variable receiving body = "vBody"
|
11
|
<#> <#> Show the list of messages:
|
12
|
Message SHOW "Information" : "Subject: '%vSubject%' From: '%vFrom%' ----------------------------- %vBody%" (other parameters: x = -100, y = -100, Window title = Emails received, Buttons = OK, Timeout (seconds) = 0, Always on top = ).
|
13
|
ELSE activate
|
14
|
Message SHOW "Error" : "No message is waiting on e-mail account." (other parameters: x = -100, y = -100, Window title = Message, Buttons = OK, Timeout (seconds) = , Always on top = ).
|
15
|
ENDIF
|
16
|
<#> <#> Disconnect from the account:
|
17
|
E-mail POP3: DISCONNECT Connection Id = POP3Connection
|
|
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 number of messages:
<email_pop3_getlist>("POP3Connection","vNumOfMessages","","")
<#> Are there some messages?
<if_num>("vNumOfMessages > 0")
<#> Yes, so let's get the first one:
<email_pop3_getmail>("POP3Connection","0","vFrom","vSubject","vBody")
<#> Show the list of messages:
<msg>(-100,-100,"Subject: '%vSubject%'
From: '%vFrom%'
-----------------------------
%vBody%","Emails received",1,0,0)
<else>
<msg>(-100,-100,"No message is waiting on e-mail account.","Message",1,,2)
<endif>
<#> Disconnect from the account:
<email_pop3_disconnect>("POP3Connection")