Is it possible to send a mail from a servlet? Explain?

Answer Posted / bhushan

yes its possible to send mail from servlets.
using dopost()method we can compose mail by hard coding HTML inside the out.println()-- this is Hidden form field mechanism. & urlRewriting.
And using sendRedirect() we reach to destination servlet.where ew again use req.getParameter().

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better jsp or servlet?

788


Does servlet have main method?

928


What is ServletContext object?

861


How can you start a jta transaction from a servlet deployed on jboss?

897


How to get the path of servlet in the server?

749


What is meant by a web application

785


What are the types of protocols supported by httpservlet ?

963


Explain the methods of request dispatcher in servlet?

761


How to handle exceptions thrown by application with another servlet?

836


How native code can be used in a servlet?

3760


How would you create deadlock on your servlet?

866


What are life cycle methods of a servlet?

810


What is the purpose of inter-servlet communication?

827


Whats the advantages using servlets over using CGI?

824


What are the different mode that servlets can be used?

777