Hi,
I an currently doing a feedback form that have several textboxes for user to input their information, afterwhich when the user click submit, the form will be email to me mailbox, is there any way to do this in jsp?
thanks!
You will have to find out if your Web Server is packaged with the JavaMail API, otherwise you will have to download and install it on your own.
Wushutwist
You need access to some kind of mail server. It doesn't have to reside on the same server as the Java Application but it needs to be accessible and support SMTP. For a free email implementation (follows GNU Public License) check out
Hi,
i tried the servlets as you have recommend and everything works find except when i run the form and submit it, the following error comes out --> Error invalid host referrer.
how to solve the problem?
thanks!
Are you sure you have the smtp server's address and port correct? Post some code. I can't guaruntee you that I can help but I may see something that is out of place. Wushutwist
I am using Argo Mail server but i not really know how to configue the server, its there other mail server hat is easy to configure?
this is the mailproperties -->
#########################################
# CSMailForm Properties #
# Coolservlets.com #
# #
# You should edit this file to match #
# your desired settings. Items in the #
# required section must be changed. The #
# optional section can be left alone. #
#########################################
######################
## REQUIRED SECTION ##
# The name of your mailserver
# ie, youHost.com
smtpServer=gsim31001
# The port number your mail server listents to.
# This is usually 25
smtpPort=25
# This should the host name where the servlet
# is housed. ie,
Can you send mail thru your mail server in the normal fashion (ie, Outlook, pine, whatever)? In most cases, it is the configuration of the mail server and not the java code, especially when you are using a package that was written and thoroughly tested previously. Wushutwist
oh...because i am working in an intranet environment, the mail server(outlook) has not been configure yet.
That is why I am trying to look into setting up a independent mail server in my pc.
Hi Wushutwist, i think i need you to explain to me what the term --> validHostName (in msg above) means. does it means the servlet directory of my webserver or anything else? because i cannot find any servlet directory in my project folder. i am using jbuilder 4 to build my application and i create a new project folder on my desktop. pls help =)
thanks!
. It is an email package that you should be able to use from within your JSP pages. Somehow I gone mixed up and sent you a Servlet only solution. Sorry. You should check out the email package, good thing is that they have the Javadocs online. They should explain most of the settings. Wushutwist
Hi, i have follow ur link and dl the package need to email someone, i have set up and tested my mail server which is working fine, but when i tried to send mail using the package, an error occurs in my mail server --> Error: [10054] Connection reset by peer.
Is there any way to solve this problem? i have configue the SMTP host exactly as i have done for my outlook express.
Thanks again.
To test further switch on the SMTP logging to see the conversation between the webserver and the mailserver. The request for a connection may not even be getting to your Mail Server.
You say the Mail Server is running locally? Do you have the SMTP host in your code set to localhost or 127.0.0.1? Did you confirm that the Mail Server is running SMTP and that it is listening on port 25? Cannot you create a telnet session to port 127.0.0.1:25? Wushutwist
Oh, i finally done it, thx alot =)
I change my SMTP_HOST from my computer name to 127.0.0.1 and its working fine on my server, but i got a question, if i set the ip to 127.0.0.1, will other person using other PC be able to send the form/email to the server?
anyway, thanks again =)
Since JSP/Servlets are server-side technologies it doesn't matter where the client is located. If it works from your machine, it will work from halfway across the world. That is the power of server-side programming. Wushutwist
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.