Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javamail help!  RSS feed

 
Abdelrahman Hatem
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a problem using javamail 1.4.3 well, i tried to make a program that sends a message from a gmail account it works fine but when i using it to send from an hotmail account it doesn't work,

well,i don't know if the port is wrong but i have searched alot and some people say it's 25 and others say it's 587 but i tried both and it doesn't work.

and i have another question i am using netbeans 6.9 for java and i know that if i want to include the mail.jar file in my project i right-click on my project->properties->.... and it works fine
but what if i wanted to run the project from the jar file after building it? i tried to do that but it's giving me errors:
Exception in thread "main" java.lang.NoClassDefFoundError: MailClient
Caused by: java.lang.ClassNotFoundException: MailClient
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: MailClient. Program will exit.
thanks in advance.
 
Andrey Choe
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have another question i am using netbeans 6.9 for java and i know that if i want to include the mail.jar file in my project i right-click on my project->properties->.... and it works fine
but what if i wanted to run the project from the jar file after building it?

Hello,
the simplest way is just add mail.jar to direcory where your application jar stored. More generally, you can read about classpath classpath faq
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!