This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
It is the problem! Thank you ! I ignored that package when I imported the javax.*. However, I met a new problem now. I sent out the message without any error now. But I didn't receive the email in the destination email address. I wrote a test program for that and got the following message:
Could you help me to explain that? Thanks in advance! Yurong
Yurong.. this is not an answer to your problem... i don't know... .. but after looking at your code, have you tried using JSTL to send email?, it is BEAUTIFUL... I think it is called mailer taglib. I've used and it's great! cheers
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
I think my problem is on setting the environment variables. However, I have set the package into my classpath. It still gave me the error message when I compiled the program:
Should I put the source code of my program here? It is a little long.
I encounter a similar problem when i send a e-mail form my SMTP code.I am suing mail.jar(version 1.3.2) and activation.jar(version 1.0.2)- doenloaded from sun's site.And i have included it in the class-path.
This is the stackTrace i get when i set session.setDebug(true). Pls. do let me know how you resolved it.
Just having mail.jar and activation.jar in your classpath is sufficient for compiling, but not for runtime. Depending on which protocols you use, you need some or all of smtp.jar, pop3.jar and imap.jar.
Originally posted by Ulf Dittmer: Just having mail.jar and activation.jar in your classpath is sufficient for compiling, but not for runtime. Depending on which protocols you use, you need some or all of smtp.jar, pop3.jar and imap.jar.
I don't believe this is correct. I have only mail.jar and activation.jar in my classpath at runtime and this works fine for SMTP and IMAP. I expect it would work for POP as well. My understanding is that smtp.jar and so on are extracts from mail.jar that you can use if having smaller jar files is important to you.
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
Gift giving made easy with the permaculture playing cards