Your Tech Guys Web Hosting Web Hosting, website hosting, web site hosting , web page hosting Apache, PHP, MySQL, PERL, servlets Java, JSP  Your Tech Guys Web Hosting Web Hosting website hosting, web site hosting, web page hosting Apache, PHP, MySQL, PERL, servlets Java, JSP,Python Your Tech Guys Web Hosting Web Hosting website hosting, web site hosting, web page hosting Apache, PHP, MySQL, PERL, servlets Java, JSP,Python Your Tech Guys Web Hosting Web Hosting website hosting, web site hosting, web page hosting Apache, PHP, MySQL, PERL, servlets Java, JSP,Python Your Tech Guys Web Hosting Web Hosting website hosting, web site hosting, web page hosting, Apache, PHP, MySQL, PERL, servlets Java, JSP,Python
Your Tech Guys Web Hosting Web Hosting, website hosting, web site hosting, web page hosting, Apache, PHP, MySQL, PERL, servlets Java, JSP, Python Your Tech Guys Web Hosting Web Hosting, website hosting, web site hosting, web page hosting, Apache, PHP, MySQL, PERL, servlets Java, Python,JSP
Your Tech Guys Web Hosting Web Hosting Sign-Up Your Tech Guys Web Hosting Fund Raising, Fundraising, web hosting, website hosting, web site hosting  Your Tech Guys Web Hosting Resellers web hosting, website hosting, web site hosting Your Tech Guys Web Hosting EZ Site Control Panel for web hosting,website hosting, web site hosting
Your Tech Guys Web Hosting Web Hosting, website hosting, web site hosting , web page hosting Apache, PHP, MySQL, PERL, servlets Java, Python,JSP,  Fundraising
Your Tech Guys Web Hosting Fund Raising, Fundraising, web hosting, website hosting, web site hosting
WWW.

Call Us Toll-Free
(877) 256-0328

Your Tech Guys Web Hosting Welcome Your Tech Guys Web Hosting Web Hosting Plans Overview , Fund Raising, Fundraising, web hosting, website hosting, web site hosting Your Tech Guys Web Hosting Fund Raising, Fundraising, web hosting Your Tech Guys Web Hosting Resellers, web Hosting Your Tech Guys Web Hosting Web Design, web Hosting Your Tech Guys Web Hosting Extra Services,  web Hosting Your Tech Guys Web Hosting Traffic Booster, web hosting Your Tech Guys Web Hosting Traffic Booster, web hosting Your Tech Guys Web Hosting Technical Support,  web Hosting Your Tech Guys Web Hosting webmaster tips,  web Hosting Your Tech Guys Web Hosting 30 Day Money Back, web hosting Your Tech Guys Web Hosting Legal Notices for Web Hosting Your Tech Guys Web Hosting Glossary Computer Terms for web Hosting Your Tech Guys Web Hosting Contact Information - web hosting

Site Map
Your Tech Guys Web Hosting Web Hosting, website hosting, web site hosting , web page hosting Apache, PHP, MySQL, PERL, servlets Java, Python, JSP Your Tech Guys Web Hosting Your Tech Guys Web Hosting Your Tech Guys Web Hosting Your Tech Guys Web Hosting Your Tech Guys Web Hosting
10 Tips for Killer Website Design

7 Sure shots ways to improve your website

Attracting Visitors and Improving Your Search Results

Chasing the Search Engines Algorithms

Crash Course in Getting a 1 Google Ranking

Design Basics

Design Your Site for Traffic in 2005

Designing A Website That Sells

Googles Good Writing Content Filter

How to Write Effective Web Copy

How to Write Title Tags for Your Web Pages

JSP

JSP Actions

JSP Directives

JSP Scripting Elements and Variables

JavaBeans

Java Brewing A Tutorial

Java How to Send Email in Java

Java Intro to JSP

Java JSP Browser Detection

Java JSP Syntax

Java JSP versus ASP

Java MySQL Database Connection

Java Programming Language

Java Virtual Machine

Java myths

Linux Commands

Make Money Fast With Google Adwords

Make Money On The Internet What Is Your Niche

Make Money Quick With Google Adsense

PHP Redirects

Ranked 1 at Google for Invisible Entrepreneurs But No Traffic

Ruby Basic Input Output

Ruby Classes Objects and Variables

Ruby Containers Blocks and Iterators

Ruby and the Web

SEO One Way Web Links 5 Strategies

SEO Success Step Two - Attracting Search Engine Attention

The 10 Best Resources for CSS

The 3 Best Website Traffic Sources

The 5 Biggest Mistakes Almost All Web Designers Make

The Click Fraud Problem

The Five Ways You Should Be Using Keywords

The Three Principles Of Image Optimization

Top 5 Secrets to Making Money with Adsense

True Paid Inclusion Programs are a Thing of the Past

Understanding Web Logs And Why it Matters

Index

Temp

Web Hosting Tips for Webmasters -
How to Send Email in Java

  • Using javax.mail (JSP)
  • Using javax.mail (Servlet)
  • Using sun.net.smtp.SmtpClient

Sample JSP EMAIL Application Page
Using javax.mail


<%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>

<%
  Properties props = new Properties();
  props.put("mail.smtp.host", "localhost");
  Session s = Session.getInstance(props);
//       s.setDebug(true) ;

 MimeMessage message = new MimeMessage(s);

 InternetAddress from = new InternetAddress("support@MyDomain.net");
 message.setFrom(from);
  InternetAddress to = new InternetAddress("support@YourDomain.net");
  message.addRecipient(Message.RecipientType.TO, to);

  message.setSubject("Test from JavaMail.");
  message.setText("Hello from JavaMail!");
  Transport.send(message);
%>
<html>
<p align="center">A Message has been sent.<br>Check your inbox.</p>
<p align="center"><a href="mailjavax.jsp">Click here to send another!</a></p>
</html>

Sample Servlet EMAIL Application Page
Using javax.mail



import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;


public class AHMail extends HttpServlet {
  public void doGet(HttpServletRequest request,
                    HttpServletResponse response)
      throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();

    String docType =
      "\n";
    out.println(docType +
                "\n" +
                "Hello\n" +
                "\n" );



  Properties props = new Properties();
          out.println("props.put
"); props.put("mail.smtp.host", "localhost"); Session s = Session.getInstance(props); out.println("Session.getInstance
"); try { MimeMessage message = new MimeMessage(s); InternetAddress from = new InternetAddress("support@YouDomain.com"); message.setFrom(from); InternetAddress to = new InternetAddress("Customer@AOL.com"); message.addRecipient(Message.RecipientType.TO, to); message.setSubject("Test from JavaMail."); message.setText("Hello from JavaMail!"); Transport.send(message); out.println("Transport.send ALL DONE
"); out.println(" " ); } catch (Exception ex) { ex.printStackTrace(); out.println("exception: " + ex.getMessage() ); } } }

Sample JSP EMAIL Application Page
Using sun.net.smtp.SmtpClient


<html>
<head>
<title>Sample EMAIL Application JSP Page </title>
</head>

<%@ page import="sun.net.smtp.SmtpClient, java.io.*" %>
<%
 String from="dennis@TESTINGhosting.com";
 String to="test@TESTINGhosting.com";
 try{
     SmtpClient client = new SmtpClient("localhost");
     client.from(from);
     client.to(to);
     PrintStream message = client.startMessage();
     message.println("To: " + to);
     message.println("Subject:  Sending email from JSP!");
     message.println("This was sent from a JSP page!");
     message.println();
     message.println("Cool beans! :-)");
     message.println();
     message.println();
     client.closeServer();
  }
  catch (IOException e){
     System.out.println("ERROR SENDING EMAIL:"+e);
  }
%>
 </body>
 </html>


 
 
 

Add to My Yahoo!

XML icon

Add to Google

 

 

 

 

 

 

 

 

 

 

 

JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP at JSP.aldenWEBhosting.com Servlets at servlets.aldenWEBhosting.com Tomcat at Tomcat.aldenWEBhosting.com mysql at mysql.aldenWEBhosting.com Java at Java.aldenWEBhosting.com Web Hosts Portal Web Links Web Links Web Hosting JSP Solutions Web Links JSP Solutions Web Hosting Servlets Solutions Web Links Servlets Solutions Web Hosting Web Links Web Links . . .
.
.
.
.
. .
. . . . . . . . . . . jsp hosting servlets hosting web hosting web sites designed cheap web hosting web site hosting myspace web hosting