Never use the sun.* packages.. they not part of the std. API... Your app
may work today but tommorow ?

Slavikos

 ################################################################
   Filippos Slavik
   Part of the SIAMS's implementation development team. For more
   information, please check http://www.siams.net

   e-mail : [EMAIL PROTECTED]

 ################################################################

 "The software said 'runs on Win95 or better,' so I installed
  it on Linux..."


----- Original Message -----
From: Andras Balogh
To: [EMAIL PROTECTED]
Sent: Tuesday, June 15, 1999 8:58 PM
Subject: Re: Sending emails


HI !!

A simple working exemple:


sun.net.smtp.SmtpClient sendmail = new
sun.net.smtp.SmtpClient("yourmailserver.somewhere.com");
PrintStream mail = null;
sendmail.from("[EMAIL PROTECTED]");
sendmail.to("[EMAIL PROTECTED]");
mail=sendmail.startMessage();
mail.println("From:[EMAIL PROTECTED]");
mail.println("To: "[EMAIL PROTECTED]);
mail.println("Subject:Hello");
mail.print("\r\n"); //header area delimiter
mail.println(" Hello how are You ?");

mail.println(" This example is working !");
mail.flush();
mail.close();
sendmail.closeServer();


Best wishes,.
                Andras


-----Original Message-----
From: Nelson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, June 15, 1999 7:26 PM
Subject: Sending emails


Hi all,

How do I send an email from a servlet????

Thanks,
Nelson Ponce

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to