| Author |
providing email functionality using struts
|
subbu raman
Greenhorn
Joined: May 18, 2004
Posts: 4
|
|
Hi, I am new to struts framework,so i thought i could just post a message on how to go about building an application using struts for sending mails.Can anybody let me know of some examples where u hav a form and then submit the data and then the content is sent a mail.Please let me know any resources or links conataining examples or any web sites.Thanks. Regards SUBBU
|
 |
sunitha reghu
Ranch Hand
Joined: Dec 12, 2002
Posts: 937
|
|
Of course you can. But you need java mail api. So check this http://java.sun.com/products/javamail/ and also there are lot of tutorials available in net. Pls do a seacrh in servlets section in JR.
|
 |
Lou Pellegrini
Ranch Hand
Joined: Nov 11, 2003
Posts: 105
|
|
I don't think struts will actually send an e-mail, but you can use it to capture the data you'll need like address, subject, and message. Once you have all that then you can use JavaMail to send the e-mail. http://java.sun.com/products/javamail/. LOu
|
 |
subbu raman
Greenhorn
Joined: May 18, 2004
Posts: 4
|
|
Hi Thanks for the reply.I have the java mail API.What i want is like some example application say which has form and when the user submits collects all data and then action class is called which in turn uses java mail API.Any sample application which puts together the entire thing using struts framework. Kindly let me know any website which provides these examples or any other resource.Thanks.
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11945
|
|
|
Practically any Struts tutorial will show you how to handle forms with Struts. Combine the form-processing action from such a tutorial with a JavaMail tutorial and that's about it.
|
Author of Test Driven (Manning Publications, 2007) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
sunitha reghu
Ranch Hand
Joined: Dec 12, 2002
Posts: 937
|
|
Hi subbu, Check this web page and this [URL=http://forum.java.sun.com/thread.jsp?forum=33&thread=66801&start=60&range=15&hilite=false&q=]thread[/URL. I have developed a email web app. So if you have difficulty please pm me and i will send the source code.
Originally posted by subbu raman: Hi Thanks for the reply.I have the java mail API.What i want is like some example application say which has form and when the user submits collects all data and then action class is called which in turn uses java mail API.Any sample application which puts together the entire thing using struts framework. Kindly let me know any website which provides these examples or any other resource.Thanks.
]
|
 |
somkiat puisungnoen
Ranch Hand
Joined: Jul 04, 2003
Posts: 1312
|
|
|
In my work, i create mail helper class for send mail / send mail with attachment which use java mail API
|
SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
|
 |
subbu raman
Greenhorn
Joined: May 18, 2004
Posts: 4
|
|
Hi Sunitha, Thanks for the reply i found it useful.Have u developed your webapp for sendign mail using struts or normal MVC architecture.Kindly send me the source code if u have developed a webapp using struts.Thanks a lot.
|
 |
subbu raman
Greenhorn
Joined: May 18, 2004
Posts: 4
|
|
Hi Sunitha U can send me the source code to rama_19_77@yahoo.com.Thanks.
|
 |
 |
|
|
subject: providing email functionality using struts
|
|
|