2

Every day I receive several e-mails with a attached text-file (containing data that later will end up in a MySQL database). I would like to use R to connect to the mail server, check for mail from a specific e-mail address, and download and save the attached txt-file to a specified folder.

To handle this job I am planning on setting up a cronjob on Linux to start this R job at different daily intervals, and I will also be using R to push data from the files to MySQL.

Any suggestions?

Alexander
  • 624
  • 2
  • 7
  • 18
  • 1
    Edit with code that you have tried. Are you running into problems? Have you Googled this issue? http://stackoverflow.com/questions/4241812/how-can-i-send-receive-smtp-pop3-email-using-r] http://stackoverflow.com/questions/13941003/connect-r-to-pop-email-server-gmail] – duHaas Mar 19 '14 at 20:22
  • @duHaas, I have not tried with any code as I am dont know what code to try. Regarding this, http://stackoverflow.com/questions/13941003/connect-r-to-pop-email-server-gmailm that would mean using R to invoke Python, and I know very little about Python and would prefer using only R for this particular job. I think I might follow this lead using the RPackage "RJython". And this hack http://stackoverflow.com/questions/4241812/how-can-i-send-receive-smtp-pop3-email-using-r seems to be specific for windows, and is dependent on several other installs - buth the rjython need to be tried. – Alexander Mar 19 '14 at 20:33
  • 1
    Maybe the edeR package can do this. Did not try it, though. – Karsten W. Mar 19 '14 at 21:24
  • 1
    Another option may be to use the c library libEtPan from within R. If you wrap your code into a package, you will be a hero! – Karsten W. Mar 19 '14 at 21:34

0 Answers0