Re: Java servlet and mailing

2002-02-22 Thread Kurt Kurniawan

one simple way to do this is using this package:

sun.net.smtp.SmtpClient  You just have to import, and it comes with the J2SE, so don't 
have to do anythin'
But you need to have an SMTP server running.

import sun.net.smtp.SmtpClient;

and do : sun.net.smtp.SmtpClient sm = new sun.net.smtp.SmtpClient(mserver);

mserver is your SMTP server name. Can be the ip address if you like.
then:
sm.from(rfrom);
sm.to(rto@here);

rfrom and rto can be any String type, rto have to be email address of course. then do: 
PrintStream msg = sm.startMessage();

add:...
msg.println(To: );
msg.println(rto);
msg.print(Subject: );
msg.println(your message);
msg.println();
sm.closeServer();

That's it ! Don't forget to try and catch to see if this throws exceptions!

From:

Kurt

*
- NOTICE -
The information transmitted is intended only for the person or entity 
to which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, 
or taking of any action in reliance upon, this information by persons
or entities other than the intended recipient is prohibited.  If you 
have received this email in error, please notify the sender and delete
the material from your computer.

Internet communications are not secure.  You should scan this message 
and any attachments for viruses.  Under no circumstances do we accept 
liability for any loss or damage which may result from your receipt of 
this message or any attachments.
*


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Java servlet and mailing

2002-02-22 Thread Uma Maheswar

Hi,
There is a ready made programme out there in www.globalleafs.com . You can
download it from our site.

Uma


- Original Message -
From: Simon [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 4:01 AM
Subject: Java servlet and mailing


 Dear,

 I come from PHP world, so that i don't really know about this.

 If i need to sent out an email in my serlvet program, do i need to
download
 and install javamail?
 (I did a mail() in PHP, which calls /bin/mail indeed, most likely...)

 According to this FAQ saying:
 http://java.sun.com/products/javamail/FAQ.html#1

 Q: What is the JavaMailTM API?
 A: The JavaMailTM API is a set of abstract APIs that model a mail system.
 The API provides a platform independent and protocol independent framework
 to build Java technology based email client applications. The JavaMail API
 provides facilities for reading and sending email. Service providers
 implement particular protocols. Several service providers are included
with
 the JavaMail API package; others are available separately. The JavaMail
API
 is implemented as a Java optional package that can be used on JDK 1.1.6
and
 later. The JavaMail API is also a required part of the JavaTM 2 Platform,
 Enterprise Edition (J2EETM).

 Do I have J2SE, i don't have JavaMail right?
 So, the easy way out, is to install J2EE in the first place, rather than
 J2SE?

 I don't this sounds stupid, but please help.

 Many thanks!

 Simon.


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Java servlet and mailing

2002-02-21 Thread Simon

Dear,

I come from PHP world, so that i don't really know about this.

If i need to sent out an email in my serlvet program, do i need to download
and install javamail?
(I did a mail() in PHP, which calls /bin/mail indeed, most likely...)

According to this FAQ saying:
http://java.sun.com/products/javamail/FAQ.html#1

Q: What is the JavaMailTM API?
A: The JavaMailTM API is a set of abstract APIs that model a mail system.
The API provides a platform independent and protocol independent framework
to build Java technology based email client applications. The JavaMail API
provides facilities for reading and sending email. Service providers
implement particular protocols. Several service providers are included with
the JavaMail API package; others are available separately. The JavaMail API
is implemented as a Java optional package that can be used on JDK 1.1.6 and
later. The JavaMail API is also a required part of the JavaTM 2 Platform,
Enterprise Edition (J2EETM).

Do I have J2SE, i don't have JavaMail right?
So, the easy way out, is to install J2EE in the first place, rather than
J2SE?

I don't this sounds stupid, but please help.

Many thanks!

Simon.


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Java servlet and mailing

2002-02-21 Thread rsequeira


You could live w/o J2EE is you wish to just use JavaMail.
Download javamail from the following url:
http://java.sun.com/products/javamail/index.html
You will need the java avtication framework as well:
http://java.sun.com/products/javabeans/glasgow/jaf.html

Thanks.
RS




Simon [EMAIL PROTECTED] on 02/21/2002 04:31:07 PM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:   Tomcat Users List [EMAIL PROTECTED]
cc:

Subject:  Java servlet and mailing

Dear,

I come from PHP world, so that i don't really know about this.

If i need to sent out an email in my serlvet program, do i need to download
and install javamail?
(I did a mail() in PHP, which calls /bin/mail indeed, most likely...)

According to this FAQ saying:
http://java.sun.com/products/javamail/FAQ.html#1

Q: What is the JavaMailTM API?
A: The JavaMailTM API is a set of abstract APIs that model a mail system.
The API provides a platform independent and protocol independent framework
to build Java technology based email client applications. The JavaMail API
provides facilities for reading and sending email. Service providers
implement particular protocols. Several service providers are included with
the JavaMail API package; others are available separately. The JavaMail API
is implemented as a Java optional package that can be used on JDK 1.1.6 and
later. The JavaMail API is also a required part of the JavaTM 2 Platform,
Enterprise Edition (J2EETM).

Do I have J2SE, i don't have JavaMail right?
So, the easy way out, is to install J2EE in the first place, rather than
J2SE?

I don't this sounds stupid, but please help.

Many thanks!

Simon.


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]









--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: TC Re: Java servlet and mailing

2002-02-21 Thread Kirby Vandivort

Or, just use it.  Tomcat (4.x, at least) ships with mail.jar and
jaf.jar..  Just do the imports and you are set.  (you will probably
need to set up your build.xml so that it knows where they are..  They
are in common/lib)

On Thu, Feb 21, 2002 at 05:53:56PM -0600, [EMAIL PROTECTED] wrote:
 
 You could live w/o J2EE is you wish to just use JavaMail.
 Download javamail from the following url:
 http://java.sun.com/products/javamail/index.html
 You will need the java avtication framework as well:
 http://java.sun.com/products/javabeans/glasgow/jaf.html
 
 Thanks.
 RS
 
 
 
 
 Simon [EMAIL PROTECTED] on 02/21/2002 04:31:07 PM
 
 Please respond to Tomcat Users List [EMAIL PROTECTED]
 
 To:   Tomcat Users List [EMAIL PROTECTED]
 cc:
 
 Subject:  Java servlet and mailing
 
 Dear,
 
 I come from PHP world, so that i don't really know about this.
 
 If i need to sent out an email in my serlvet program, do i need to download
 and install javamail?
 (I did a mail() in PHP, which calls /bin/mail indeed, most likely...)
 
 According to this FAQ saying:
 http://java.sun.com/products/javamail/FAQ.html#1
 
 Q: What is the JavaMailTM API?
 A: The JavaMailTM API is a set of abstract APIs that model a mail system.
 The API provides a platform independent and protocol independent framework
 to build Java technology based email client applications. The JavaMail API
 provides facilities for reading and sending email. Service providers
 implement particular protocols. Several service providers are included with
 the JavaMail API package; others are available separately. The JavaMail API
 is implemented as a Java optional package that can be used on JDK 1.1.6 and
 later. The JavaMail API is also a required part of the JavaTM 2 Platform,
 Enterprise Edition (J2EETM).
 
 Do I have J2SE, i don't have JavaMail right?
 So, the easy way out, is to install J2EE in the first place, rather than
 J2SE?
 
 I don't this sounds stupid, but please help.
 
 Many thanks!
 
 Simon.
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 
 
 
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

-- 

Kirby Vandivort  Theoretical Biophysics Group
Email: [EMAIL PROTECTED]  3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/University of Illinois
Phone: (217) 244-5711405 N. Mathews Ave
Fax  : (217) 244-6078Urbana, IL  61801, USA

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: TC Re: Java servlet and mailing

2002-02-21 Thread rsequeira


Correct! Thanks. Totally miss the 4.x deal sometimes! :-)





Kirby Vandivort [EMAIL PROTECTED] on 02/21/2002 06:00:11 PM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:   Tomcat Users List [EMAIL PROTECTED]
cc:

Subject:  Re: TC Re: Java servlet and mailing

Or, just use it.  Tomcat (4.x, at least) ships with mail.jar and
jaf.jar..  Just do the imports and you are set.  (you will probably
need to set up your build.xml so that it knows where they are..  They
are in common/lib)

On Thu, Feb 21, 2002 at 05:53:56PM -0600, [EMAIL PROTECTED] wrote:

 You could live w/o J2EE is you wish to just use JavaMail.
 Download javamail from the following url:
 http://java.sun.com/products/javamail/index.html
 You will need the java avtication framework as well:
 http://java.sun.com/products/javabeans/glasgow/jaf.html

 Thanks.
 RS




 Simon [EMAIL PROTECTED] on 02/21/2002 04:31:07 PM

 Please respond to Tomcat Users List [EMAIL PROTECTED]

 To:   Tomcat Users List [EMAIL PROTECTED]
 cc:

 Subject:  Java servlet and mailing

 Dear,

 I come from PHP world, so that i don't really know about this.

 If i need to sent out an email in my serlvet program, do i need to
download
 and install javamail?
 (I did a mail() in PHP, which calls /bin/mail indeed, most likely...)

 According to this FAQ saying:
 http://java.sun.com/products/javamail/FAQ.html#1

 Q: What is the JavaMailTM API?
 A: The JavaMailTM API is a set of abstract APIs that model a mail system.
 The API provides a platform independent and protocol independent
framework
 to build Java technology based email client applications. The JavaMail
API
 provides facilities for reading and sending email. Service providers
 implement particular protocols. Several service providers are included
with
 the JavaMail API package; others are available separately. The JavaMail
API
 is implemented as a Java optional package that can be used on JDK 1.1.6
and
 later. The JavaMail API is also a required part of the JavaTM 2 Platform,
 Enterprise Edition (J2EETM).

 Do I have J2SE, i don't have JavaMail right?
 So, the easy way out, is to install J2EE in the first place, rather than
 J2SE?

 I don't this sounds stupid, but please help.

 Many thanks!

 Simon.


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]









 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--

Kirby Vandivort  Theoretical Biophysics Group
Email: [EMAIL PROTECTED]  3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/University of Illinois
Phone: (217) 244-5711405 N. Mathews Ave
Fax  : (217) 244-6078Urbana, IL  61801, USA

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]









--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]