2 pemikiran pada “Commons Email, Mengirim Email Sederhana

  1. kk saya kok ada error begini :

    Exception in thread “main” java.lang.NoClassDefFoundError: javax/mail/Message
    at EmailSender.EmailSederhana.main(EmailSederhana.java:8)
    Caused by: java.lang.ClassNotFoundException: javax.mail.Message
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    … 1 more
    Java Result: 1

    terus pada line ini :
    email.setAuthenticator(new DefaultAuthenticator(“username”, “password”)); saya ganti jadi email.setAuthentication(“username”, “password”);
    soalnya gk tau error merah.

    apakah harus pake maven spt contoh diatas??

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s