Results 1 to 2 of 2
  1. #1
    Marcus is offline Member
    Join Date
    Jun 2007
    Posts
    92
    Rep Power
    0

    Default To send email of page present Web from a Jsp

    Hello I need a great help, my problem is that I need to send a button submit, the page jsp that this executing in the explorer from Windows to outlook to send it like email and jsp like attached file HTML.

    Marcus:cool:

  2. #2
    Felissa is offline Member
    Join Date
    Jun 2007
    Posts
    95
    Rep Power
    0

    Default To send email of page present Web from a Jsp

    SendMail.html

    Java Code:
    <HTML> 
    <BODY> 
    <FORM METHOD=POST ACTION="DemoSendMail.jsp"> 
    Receiver name: <INPUT TYPE=TEXT NAME=username SIZE=20><BR> 
    Receiver email address: <INPUT TYPE=TEXT NAME=email SIZE=20><BR> 
    
    <P><INPUT TYPE=SUBMIT> 
    </FORM> 
    </BODY> 
    </HTML>
    DemoSendMail.jsp

    Java Code:
    <%@ taglib prefix="blx" uri="/blx.tld" %> 
    <HTML> 
    <BODY> 
    <% 
      // Get username. 
      String email = request.getParameter( "email" ) ; 
    %> 
    <% if ( email == null || email.equals ( "" )) { %> 
    Please enter an email address again. 
    <% } else { %> 
    <blx:email host="yoursmtphost.com" from=" youraddress@xxx.com This email address is being protected from spam bots, you need Javascript enabled to view it ">  
    <blx:emailTo><%= email %></blx:emailTo>  
    Thank you for registering with us.  You registered the 
    following name: <%= request.getParameter( "username" ) %> 
    You are registered<%= new java.util.Date() %> 
    
    <!--  Also write out some HTML --> 
    Thank you.  A confirmation email has been sent to <%= email %> 
    <% } %> 
    </BODY> 
    </HTML>
    Felissa:o

Similar Threads

  1. send email using JMS
    By Heather in forum Advanced Java
    Replies: 9
    Last Post: 01-07-2009, 04:04 PM
  2. Replies: 1
    Last Post: 09-27-2008, 02:42 AM
  3. Validating email address
    By ravian in forum New To Java
    Replies: 2
    Last Post: 12-21-2007, 09:42 AM
  4. help in email developing
    By reached in forum New To Java
    Replies: 0
    Last Post: 12-09-2007, 08:55 PM
  5. Email Sigs.
    By tomrayne in forum Advanced Java
    Replies: 1
    Last Post: 07-13-2007, 10:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •