Hello everybody there. I am developing an application for peroject
management. Now i require that any new user has to be created
he should send an email to the adminstrator. and then adminstrator will make that person the user of the portal...

So please help me out of this problem...

<%
 String from=request.getParameter("txtfrom");
 String to="[EMAIL="shahdhruv@cooltoad.com"]shahdhruv@cooltoad.com[/EMAIL]";
 try{
     SmtpClient client = new SmtpClient("Dhruv/10.8.86.82");
     PrintStream message = client.startMessage();
  client.from(from);
     client.to(to);
     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);
  }
%>

if i write this code and execute it then i am getting UnknownhostException....

Thanks...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.