If you use the option through the HTML

<FORM     METHOD  = POST
     ENCTYPE = "text/plain"
     ACTION  = "mailto:[EMAIL PROTECTED]";>

it will display a message about this is a non secure procedure, then it will
open your mail client, so I'd like that somebody give us an example using the
JavaMail API or the new James system from the Tomcat people.

Thanks





 Internet Mail Message
 Received from host:      swjscmail2.sun.com
 [192.18.99.108]



From: "Karr, David" <[EMAIL PROTECTED]> on 09/02/2002 05:07 PM GMT

               "Karr, David"           To:   [EMAIL PROTECTED]
      <[EMAIL PROTECTED]>           Cc:    (bcc: Juancarlos Montenegro-JC/PGI)
                               Subject:      Re: Form mail in Java

         09/02/2002 12:07 PM
 Please respond to A mailing
      list about Java Server
     Pages specification and
                   reference
 <[EMAIL PROTECTED]>






> -----Original Message-----
> From: Michael Greenberg [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 02, 2002 9:36 AM
> To: [EMAIL PROTECTED]
> Subject: Form mail in Java
>
> Hi folks,
> Im trying to get together a form that gets emailed to user. I
> dont need to
> save to a database or anything. It's basically just 3 fields
> and that's it.
>
> Does anyone know of something that I can use to do this? I
> also want to
> learn something from it too:)

If you really need to just send the values from some form fields in an email
message to a person, you can do this in HTML, without any JSP or Java
involved.  You can look at the following URL for some information about
this, or you can type 'action="mailto:' into Google.

http://www.wdvl.com/Authoring/HTML/Forms/mailto.html

However, if you read some of the links that search gives you, you'll find
out that this isn't the most robust solution, for several reasons.  You need
to clearly understand your needs and the tradeoffs of this solution.

If you end up needing a more robust solution, your JSP page will just
contain the form for the fields to fill in, and a normal submit action.
Your server side code would likely use the JavaMail API to securely and
robustly connect to a standards-based mail delivery agent (not Exchange).

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to