Go Back  HTML Forums - Free Webmaster Forums and Help Forums > Member Blogs > blogs > 220590's blog
User Name:
Password:
 

 
 Search
 
 

 
 Categories
 
 

Client Side Scripting

Server Administration

Server Side Development

Web Design

Web Industry

Way Off-Topic


 
 Recent blog posts
 
 

 
 User login
 
 

 
 Navigation
 
 

 
SmtpClient client = new SmtpClient("mail.xxxxx.xxx");
 
 
 
By 220590 at 2009-02-03 07:51

Hi all,

Could any one plz explain what is "SmtpClient client = new SmtpClient("mail.xxxxx.xxx");" in the following code?

<%@ page import="sun.net.smtp.SmtpClient, java.io.*" %>
<%
String from="gseshad@hotmail.com";
String to="gov@jguru.com, govi@bigfoot.com";
try{
SmtpClient client = new SmtpClient("mail.xxxxx.xxx");
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);
}
%>

Thanks,
Tamil.
Add to del.icio.us   Can you digg it? 220590's blog | login or register to post comments | printer friendly version

 
 
by Pegasus on Tue, 2009-02-10 03:49
 
 
 
You'd have to post that question on the forums, not in the Social Bee blog section. Try under Server-side Programming, ASP, I think.
login or register to post comments

 
 Who's online
 
 
There are currently 7 users and 217 guests online.




All times are GMT -5. The time now is 11:23 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.