Daily Archives: July 8, 2011

eclipse import cleanup

import other classes to a class is mainly a pain… a lot of imports are normally needed, a few are duplicated, and this is crap… based on PMD… ok it might be right, but in my point of view the compiler should clean the import… not that i have ever thought about it, but currently i do… 😛

and eclipse can clean the imports easyly….

Crtl+Shift+o

bah…

Eclipse is running in a JRE, but a JDK is required

this bug sucks… and its funny, because i get it from time to time… solution is kinda easy…

add following link in eclipse.ini

-vm
C:\java\jdk\bin\javaw.exe

before

-vmargs

mule imap:connector

ok tryed some things with the mule imap:connector and its kinda cool… and its kinda crap… a few functions are really cool, but dont work as expected…

imap:connector

  • checkFrequency: milliseconds to try getting new mails on the imap-server
  • deleteReadMessage: deletes the message, after read
  • backupEnabled / bachupFolder: backups the read mail to the folder… the folder is localy, not on the imap-server (partly crap)
  • moveToFolder: moves the mail to the given folder after processing. if deleteReadMessage is true, the moved message is flagged deleted too (crap), if deleteReadMessage is false, the move is a copy (crap)

imap:inbound-endpoint

  • user (is containing a @, use %40 instead)
  • password
  • host
  • port

all in all it is a really powerful connector, which reads the mailbox frequently and can be used as perfect flow starter…  additionally it returns an MimeMessage, with all the Headers and so on… but on the other hand, it cant handle the mails on the imap server… it looks like the handling on the server needs to be implemented with a POJO… if this is the way to go is a complete new question…

Verbal tennis

A game in which each player must respond with a question. Statements are out, repetition and rhetoric are not allowed.

Rosencrantz & Guildenstern Are Dead

imap

in my project at work we need to read a mail box… sounds not so easy, but actually is… mule imap:connector for the win 🙂

but testing this is a pain… first of all i needed a mail account with imap access… my company is really big an the processes to get such an email adress is huge… and yeah… we are an isp 😛 so just try to get a simple free email adress with imap… kinda hard… fastmail.fm is the solution…

could connect, but couldnt read or find directories… so had to connect with telnet, to find out everything…

in commandline:

  • telnet [host [port]] to connect
  • 1 LOGIN username password to log in (the 1 is important… imap needs numbers)
  • 1 LIST “*” “*” to list all mail boxes… no clue what the “*” are, but it has listed 🙂

this helped…