This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes email not triggering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "email not triggering" Watch "email not triggering" New topic

email not triggering

monis raza
Ranch Hand

Joined: Sep 05, 2011
Posts: 38

here is my code to trigger email.
when i am running email file as java application it is working fine but when i am adding it to servlet email is not triggering. can anyone tell me if my servlet is ok to access the code in model

Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

How is the servlet invoked? is it with GET or POST request.
I see doPost() blank. Is it intentional?

Also, how about writing syslogs to see where the flow is going?
Tel us, what you have done till now, to DEBUG this?

Regards, Prasad
SCJP 5 (93%)
Marek Krokosinski
Ranch Hand

Joined: Jun 10, 2011
Posts: 64
Try with:

instead of:
sai rama krishna
Ranch Hand

Joined: May 29, 2009
Posts: 223
getDefaultInstance Get the default Session object. If a default has not yet been setup, a new Session object is created and installed as the default.

Therefore, if one does not already exist, it call getInstance()

getInstance Get a new Session object.

So, a new session object is created, regardless of whether one already exists.
I agree. Here's the link:
subject: email not triggering
Similar Threads
How to send mail form java application
Java Mail Authentication
Auto Generated Email using Java
SendFailedException for sending simple email by using JavaMail
SHA1 digest error for javax/mail/MessagingException