<% @ page import = "Sun.net.smtp.smtpclient, java.io. *"%>
<%
String from = "** @ **. COM";
String to =
**@**.com;
Try {
SMTPCLIENT Client = New SMTPCLIENT ("Mail. **. **");
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! :-)");
Message.println ();
Message.println ("Good Boy");
Message.println ("I'm in genius.com");
Message.println ();
Client.closserver ();
}
Catch (IOException E) {
System.out.println ("Error Sending Email: E);
}
%>