I tried to crawl my email data by using 'edeR' package. I succeeded in getting 'inbox' folder, but failed to get 'sent mail'. Here are the codes.
Sys.setenv(JAVA_HOME="C:/Program Files/Java/jre1.8.0_121")
library(rJava)
library(edeR)
mail_sen<-extractBetween(username="xxxx@gmail.com",
password="xxxxx", folder="[Gmail]/Sent Mail",
startDate="06-Jan-2017", endDate="06-Mar-2017", nmail=5)
When I change (folder="[Gmail]/Sent Mail") into (folder="inbox"), it works. However, when I use the code above, error comes.
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\Java\jre1.8.0_121\lib\ext\jython.jar\Lib\imaplib.py", line 749, in uid
imaplib.error: command SEARCH illegal in state AUTH
I'm stuck in this error... Anyone who can solve this problem?