Commands & Syntax > Commands > Networking/Web/E-mail >

E-mail POP3: DELETE E-MAIL - < email_pop3_deletemail >() ... [Pro]

www.perfectkeyboard.com

 

E-mail POP3: DELETE E-MAIL
<email_pop3_deletemail>("Connection Id","E-mail number")
Available in: Professional edition

This command deletes 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 deleting 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 delete. The first e-mail message has number "0", the second one has "1" and so on....

 

Example (Macro Steps):

 

1

<#> <#> Thic sample shows how to delete e-mail from 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

<#> <#> Do we want to delete the message?

10

Message SHOW "Question" : "Do you want to delete e-mail message?" (other parameters: x = -100, y = -100, Window title = Emails received, Buttons = Yes and No, Timeout (seconds) = 0, Always on top = ).

11

IF STRING _vMsgButton==YES

12

<#> <#> Yes, so let's delete the first one:

13

E-mail POP3: DELETE E-MAIL Connection Id=POP3Connection, E-mail number=0

14

ENDIF

15

ELSE activate

16

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 = ).

17

ENDIF

18

<#> <#> Disconnect from the account:

19

E-mail POP3: DISCONNECT Connection Id = POP3Connection

Example (Plain Text):

 

<#> Thic sample shows how to delete e-mail from 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")

 

   <#> Do we want to delete the message?

   <msg>(-100,-100,"Do you want to delete e-mail message?","Emails received",2,0,1)

 

   <if_str>("_vMsgButton==YES")

      <#> Yes, so let's delete the first one:

      <email_pop3_deletemail>("POP3Connection","0")

   <endif>

 

<else>

   <msg>(-100,-100,"No message is waiting on e-mail account.","Message",1,,2)

<endif>

 

<#> Disconnect from the account:

<email_pop3_disconnect>("POP3Connection")