Forums Register Login

Exception with root cause

+Pie Number of slices to send: Send
I am making a registration form which works perfectly.
I have an email class which sends email properly. But what i want is when an admin registers a user, the user should get an auto generated email, so i replaced my main method with method emailMethod as follows :


and in my servlet i am doing this :
where userId and password are being saved in database upon registration.
where if result of registering a user is true then my method is being called, i am getting userId and password

but when i run my application, registration is successful but email is not being sent and i get this :

Servlet.service() for servlet [RegisterServlet] in context with path [/AWSCustomerJavaWebFinal] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: com.sun.mail.util.MailLogger at those two lines where i have written here

What can be the possible reason?
+Pie Number of slices to send: Send
A java.lang.ClassNotFoundException is thrown when the jvm isn't able to locate a given class. Have you included the jar containing MailLogger (I think its the javax mail api) both at compile time as well as running the application ?

this llama doesn't want your drama, he just wants this tiny ad for his mama
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 728 times.
Similar Threads
com.sun.mail.util.MailLogger
JavaMail, servlet error
SHA1 digest error for javax/mail/MessagingException
free smtp server for testing java mail program
email not triggering
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:47:18.