jungleford's profileJungleford's Home MSN 总舵PhotosBlogListsMore Tools Help
    5/5/2005

    【JExp】我的JavaMail客户端(2004-11-14)

    jungleford如是说

         近来实在太忙了,一个邮件客户端写写停停,直到现在还是一个没怎么经过测试的命令行方式的版本,但聊胜于无,通过这个小项目学习了一下JavaMail和POP协议,又实践了一两个设计模式,感觉还是比较有意义的,以后有空会慢慢做好。ICEMail是个相当不错的客户端系统,但我试过以后还是发现它每次接受POP邮件的时候还是从头开始收起,POP协议虽然简单——的确是简单——但方便了服务器的同时却让客户端的开发人员皱眉头:不维护状态的协议需要在客户端考虑太多的东西。JavaMail虽然封装得非常好,但要写一个好的客户端并不是一件easy的事情。我只用了JavaMail本身的API,没有用SUN的provider,中间碰到了不少细节上的问题,有的地方解决方法还是老土,但觉得比啥都copy来得有意思,呵呵……现在这个版本可能有的中文邮件显示成乱码,那是因为根据RFC 822,邮件在发送时可能没有按标准编码,如果指定用中文解码可以得到解决,但在别的字符集下仍然不是一个好的方案,利用Locale可能是一个办法,等我忙完手头的先~~~

    JExp 0.1 命令行版本:JExp.rar

    环境:JDK 1.4,JAFJavaMail;将activation.jar和mail.jar加入classpath

    运行:先解开rar文件,再用 jar -x 解开jar包,在目录下运行 java com.jungleford.jexp.JExp,进入命令行用help命令显示各种命令(仿UNIX的形式)

    源代码:已经包含在jar包中,是完全公开的,你可以随意修改,如果你能给我一些意见建议的话,我将会非常感激  :)

    截图:
    o_jexp.jpg

    资料:

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://jungleford.spaces.live.com/blog/cns!E733CCEEE4BE0FB2!286.trak
    Weblogs that reference this entry
    • None