The question how to delete email

Discuss RoboTask here
Post Reply
john.k
Posts: 5
Joined: Wed Mar 02, 2011 10:03 pm

The question how to delete email

Post by john.k »

Tell me how to remove it from the gmail email with a
certain subject?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

The question how to delete email

Post by Oleg »

Use "POP3 Mail loop" action
Algorithm will be approx this:

POP3 Open
POP3 Mail Loop
   if subj = 'Some string' then
      POP3 Delete Email // by order num
   endif
end loop

Do you need an example?
john.k
Posts: 5
Joined: Wed Mar 02, 2011 10:03 pm

The question how to delete email

Post by john.k »

Oleg wrote: Do you need an example?


Yes, please.
Last edited by john.k on Sat Dec 10, 2011 9:06 pm, edited 1 time in total.
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

The question how to delete email

Post by Oleg »

See below.
Of course you need change mail server, authentication parameters, and condition to yours.

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|335077256
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1121"
Hide=INTEGER|0
ID=INTEGER|948370511
LocalVariables=STRING|"MsgNum,MsgSubj"
LogOnAsUser=INTEGER|1
Name=STRING|"Delete email by subject"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER

[Actions\Action1]
ActionID=STRING|"A_EMAIL_OPEN"
Enabled=INTEGER|-1
Name=STRING|"POP3 Open"
Params=FOLDER

[Actions\Action1\Params]
host=STRING|"mail.domain.com"
password=STRING|"4438845245462874500344480"
port=STRING|"110"
SSL=STRING|"0"
user=STRING|"user"

[Actions\Action2]
ActionID=STRING|"A_EMAIL_LOOP"
Enabled=INTEGER|-1
Name=STRING|"POP3 Mail Loop"
Params=FOLDER

[Actions\Action2\Params]
number=STRING|"MsgNum"
subj=STRING|"MsgSubj"
usecc=STRING|"0"
usedate=STRING|"0"
usefrom=STRING|"0"
usesize=STRING|"0"
usesubj=STRING|"1"
useto=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action3\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"0"
value1=STRING|"{MsgSubj}"
value2=STRING|"Some string"

[Actions\Action4]
ActionID=STRING|"A_EMAIL_DELETE"
Enabled=INTEGER|-1
Name=STRING|"POP3 Delete Email"
Params=FOLDER

[Actions\Action4\Params]
num=STRING|"{MsgNum}"

[Actions\Action5]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action6]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
john.k
Posts: 5
Joined: Wed Mar 02, 2011 10:03 pm

The question how to delete email

Post by john.k »

All do, but the subject gets data of this type:

=?UTF-8?B?0J3QsCDRgdCw0LnRgtC1IHd3?=.Uxty. =?UTF-8?B?
a3og0LTQvtCx0LDQstC70LXQvdGLINC90L7QstGL0LUg0YTQuNC70YzQvNG
L?=
john.k
Posts: 5
Joined: Wed Mar 02, 2011 10:03 pm

The question how to delete email

Post by john.k »

How to get a string of normal form?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

The question how to delete email

Post by Oleg »

It seems the program have problems with UTF-8 messages with non-latin characters.
Post Reply