Re: Tomcat configuring for email

2003-06-09 Thread John Turner
Yes.  Tomcat is not a mail transfer agent (MTA).  You will need a MTA on 
the standard port (port 25), either on localhost or some other host.  
Typical MTAs are sendmail, qmail, Microsoft's IIS, and many more.

The mail services included with Tomcat for sending mail interface with an 
MTA, they do not implement an MTA.

You can use any compatible MTA, such as sendmail on localhost if you have a 
UNIX-like system, or Microsoft's SMTP service on localhost if you have 
Windows, or any other remote MTA that is available to you, such as the MTA 
provided by your ISP.
John

On Sat, 7 Jun 2003 12:45:13 +0800, Clement [EMAIL PROTECTED] wrote:

sorry i am at a lost... do u mean that an additional SMTP server/
program is needed??
- Original Message -
From: John Corrigan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 11:41
Subject: RE: Tomcat configuring for email

Provided that localhost has an SMTP server then yes, e-mailing is on.
The
example .jsp does in fact send e-mails provided that everything else is
configured correctly.
-Original Message-
From: Clement [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 8:30 PM
To: Tomcat Users List
Subject: Re: Tomcat configuring for email
Hello.
Sorry for the confusion. What i meant does tomcat have a built in
emailing? As u replied there is .
But is it on by default? when i try running the example inside , it
seems to be a dummy one.
What i am trying to do is to mail a user automatically everytime he
makes a purchase.
inside the default server.xml as shown below, is this the way to
enable
emailing or is there more to it?
Thanks..
Environment name=maxExemptions type=java.lang.Integer
value=15/
Parameter name=context.param.name value=context.param.value
override=false/
Resource name=jdbc/computersDB auth=SERVLET
type=javax.sql.DataSource/
ResourceParams name=jdbc/computersDB
parameternameuser/namevaluesa/value/parameter
parameternamepassword/namevalue/value/parameter
parameternamedriverClassName/name
valueorg.hsql.jdbcDriver/value/parameter
parameternamedriverName/name
valuejdbc:HypersonicSQL:database/value/parameter
/ResourceParams
Resource name=mail/Session auth=Container
type=javax.mail.Session/
ResourceParams name=mail/Session
parameter
namemail.smtp.host/name
valuelocalhost/value
/parameter
/ResourceParams
/Context
- Original Message -
From: Phillip Qin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, June 06, 2003 23:17
Subject: RE: Tomcat configuring for email
 Don't understand your question. Tomcat has built-in mail session jndi
 lookup. You can use it in your program. Is that what you want?

 -Original Message-
 From: Clement [mailto:[EMAIL PROTECTED]
 Sent: June 6, 2003 2:53 AM
 To: Tomcat Users List
 Subject: Tomcat configuring for email

 Hello...
 I would like to check with for emailing purposes.. how do i enable
 tomcat to send an email to a user? Can version 4.01 do this or do u 
need
a
 newer version? ?
 Thanks..


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat configuring for email

2003-06-09 Thread Phillip Qin
Tomcat has this nice feature called Resource mail/Session. Without this
feature, in your code, you get a mail session by:

Properties props = new Properties();
props.put(mail.smtp.host, mysmtphost);
Session mailsession = Session.getDefaultInstance(props, null);

With Tomcat's jndi lookup, you can get session by:

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
Session session = (Session) envCtx.lookup(mail/Session);

But you still need to setup the sending params, such as

Message m = new MimeMessage(session);
m.setFrom(sender);
m.addRecipient(Message.RecipientType.TO, recipient);
m.setSentDate(date);
m.setSubject(subject);
m.setText(text);

Transport.send(m);

-Original Message-
From: Clement [mailto:[EMAIL PROTECTED] 
Sent: June 6, 2003 11:30 PM
To: Tomcat Users List
Subject: Re: Tomcat configuring for email

Hello.
Sorry for the confusion. What i meant does tomcat have a built in
emailing? As u replied there is .
But is it on by default? when i try running the example inside , it
seems to be a dummy one.
What i am trying to do is to mail a user automatically everytime he
makes a purchase.
inside the default server.xml as shown below, is this the way to enable
emailing or is there more to it?
Thanks..
  Environment name=maxExemptions type=java.lang.Integer
  value=15/
  Parameter name=context.param.name value=context.param.value
 override=false/
  Resource name=jdbc/computersDB auth=SERVLET
type=javax.sql.DataSource/
  ResourceParams name=jdbc/computersDB
parameternameuser/namevaluesa/value/parameter
parameternamepassword/namevalue/value/parameter
parameternamedriverClassName/name
  valueorg.hsql.jdbcDriver/value/parameter
parameternamedriverName/name
  valuejdbc:HypersonicSQL:database/value/parameter
  /ResourceParams
  Resource name=mail/Session auth=Container
type=javax.mail.Session/
  ResourceParams name=mail/Session
parameter
  namemail.smtp.host/name
  valuelocalhost/value
/parameter
  /ResourceParams
/Context

- Original Message -
From: Phillip Qin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, June 06, 2003 23:17
Subject: RE: Tomcat configuring for email


 Don't understand your question. Tomcat has built-in mail session jndi
 lookup. You can use it in your program. Is that what you want?

 -Original Message-
 From: Clement [mailto:[EMAIL PROTECTED]
 Sent: June 6, 2003 2:53 AM
 To: Tomcat Users List
 Subject: Tomcat configuring for email

 Hello...
 I would like to check with for emailing purposes.. how do i enable
 tomcat to send an email to a user? Can version 4.01 do this or do u need a
 newer version? ?
 Thanks..



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat configuring for email

2003-06-06 Thread Clement
Hello...
I would like to check with for emailing purposes.. how do i enable tomcat to send 
an email to a user? Can version 4.01 do this or do u need a newer version? ?
Thanks..


Re: Tomcat configuring for email

2003-06-06 Thread Tim Funk
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html

Look for the JavaMail Sessions section.

-Tim

Clement wrote:
Hello...
I would like to check with for emailing purposes.. how do i enable tomcat to send an email to a user? Can version 4.01 do this or do u need a newer version? ?
Thanks..



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat configuring for email

2003-06-06 Thread Phillip Qin
Don't understand your question. Tomcat has built-in mail session jndi
lookup. You can use it in your program. Is that what you want?

-Original Message-
From: Clement [mailto:[EMAIL PROTECTED] 
Sent: June 6, 2003 2:53 AM
To: Tomcat Users List
Subject: Tomcat configuring for email

Hello...
I would like to check with for emailing purposes.. how do i enable
tomcat to send an email to a user? Can version 4.01 do this or do u need a
newer version? ?
Thanks..



Re: Tomcat configuring for email

2003-06-06 Thread Clement
Hello.
Sorry for the confusion. What i meant does tomcat have a built in
emailing? As u replied there is .
But is it on by default? when i try running the example inside , it
seems to be a dummy one.
What i am trying to do is to mail a user automatically everytime he
makes a purchase.
inside the default server.xml as shown below, is this the way to enable
emailing or is there more to it?
Thanks..
  Environment name=maxExemptions type=java.lang.Integer
  value=15/
  Parameter name=context.param.name value=context.param.value
 override=false/
  Resource name=jdbc/computersDB auth=SERVLET
type=javax.sql.DataSource/
  ResourceParams name=jdbc/computersDB
parameternameuser/namevaluesa/value/parameter
parameternamepassword/namevalue/value/parameter
parameternamedriverClassName/name
  valueorg.hsql.jdbcDriver/value/parameter
parameternamedriverName/name
  valuejdbc:HypersonicSQL:database/value/parameter
  /ResourceParams
  Resource name=mail/Session auth=Container
type=javax.mail.Session/
  ResourceParams name=mail/Session
parameter
  namemail.smtp.host/name
  valuelocalhost/value
/parameter
  /ResourceParams
/Context

- Original Message -
From: Phillip Qin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, June 06, 2003 23:17
Subject: RE: Tomcat configuring for email


 Don't understand your question. Tomcat has built-in mail session jndi
 lookup. You can use it in your program. Is that what you want?

 -Original Message-
 From: Clement [mailto:[EMAIL PROTECTED]
 Sent: June 6, 2003 2:53 AM
 To: Tomcat Users List
 Subject: Tomcat configuring for email

 Hello...
 I would like to check with for emailing purposes.. how do i enable
 tomcat to send an email to a user? Can version 4.01 do this or do u need a
 newer version? ?
 Thanks..



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat configuring for email

2003-06-06 Thread John Corrigan
Provided that localhost has an SMTP server then yes, e-mailing is on.  The
example .jsp does in fact send e-mails provided that everything else is
configured correctly.

-Original Message-
From: Clement [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 8:30 PM
To: Tomcat Users List
Subject: Re: Tomcat configuring for email


Hello.
Sorry for the confusion. What i meant does tomcat have a built in
emailing? As u replied there is .
But is it on by default? when i try running the example inside , it
seems to be a dummy one.
What i am trying to do is to mail a user automatically everytime he
makes a purchase.
inside the default server.xml as shown below, is this the way to enable
emailing or is there more to it?
Thanks..
  Environment name=maxExemptions type=java.lang.Integer
  value=15/
  Parameter name=context.param.name value=context.param.value
 override=false/
  Resource name=jdbc/computersDB auth=SERVLET
type=javax.sql.DataSource/
  ResourceParams name=jdbc/computersDB
parameternameuser/namevaluesa/value/parameter
parameternamepassword/namevalue/value/parameter
parameternamedriverClassName/name
  valueorg.hsql.jdbcDriver/value/parameter
parameternamedriverName/name
  valuejdbc:HypersonicSQL:database/value/parameter
  /ResourceParams
  Resource name=mail/Session auth=Container
type=javax.mail.Session/
  ResourceParams name=mail/Session
parameter
  namemail.smtp.host/name
  valuelocalhost/value
/parameter
  /ResourceParams
/Context

- Original Message -
From: Phillip Qin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, June 06, 2003 23:17
Subject: RE: Tomcat configuring for email


 Don't understand your question. Tomcat has built-in mail session jndi
 lookup. You can use it in your program. Is that what you want?

 -Original Message-
 From: Clement [mailto:[EMAIL PROTECTED]
 Sent: June 6, 2003 2:53 AM
 To: Tomcat Users List
 Subject: Tomcat configuring for email

 Hello...
 I would like to check with for emailing purposes.. how do i enable
 tomcat to send an email to a user? Can version 4.01 do this or do u need a
 newer version? ?
 Thanks..



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat configuring for email

2003-06-06 Thread Clement
sorry i am at a lost... do u mean that an additional SMTP server/
program is needed??
- Original Message -
From: John Corrigan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, June 07, 2003 11:41
Subject: RE: Tomcat configuring for email


 Provided that localhost has an SMTP server then yes, e-mailing is on.
The
 example .jsp does in fact send e-mails provided that everything else is
 configured correctly.

 -Original Message-
 From: Clement [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2003 8:30 PM
 To: Tomcat Users List
 Subject: Re: Tomcat configuring for email


 Hello.
 Sorry for the confusion. What i meant does tomcat have a built in
 emailing? As u replied there is .
 But is it on by default? when i try running the example inside , it
 seems to be a dummy one.
 What i am trying to do is to mail a user automatically everytime he
 makes a purchase.
 inside the default server.xml as shown below, is this the way to
enable
 emailing or is there more to it?
 Thanks..
   Environment name=maxExemptions type=java.lang.Integer
   value=15/
   Parameter name=context.param.name value=context.param.value
  override=false/
   Resource name=jdbc/computersDB auth=SERVLET
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/computersDB
 parameternameuser/namevaluesa/value/parameter
 parameternamepassword/namevalue/value/parameter
 parameternamedriverClassName/name
   valueorg.hsql.jdbcDriver/value/parameter
 parameternamedriverName/name
   valuejdbc:HypersonicSQL:database/value/parameter
   /ResourceParams
   Resource name=mail/Session auth=Container
 type=javax.mail.Session/
   ResourceParams name=mail/Session
 parameter
   namemail.smtp.host/name
   valuelocalhost/value
 /parameter
   /ResourceParams
 /Context

 - Original Message -
 From: Phillip Qin [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Friday, June 06, 2003 23:17
 Subject: RE: Tomcat configuring for email


  Don't understand your question. Tomcat has built-in mail session jndi
  lookup. You can use it in your program. Is that what you want?
 
  -Original Message-
  From: Clement [mailto:[EMAIL PROTECTED]
  Sent: June 6, 2003 2:53 AM
  To: Tomcat Users List
  Subject: Tomcat configuring for email
 
  Hello...
  I would like to check with for emailing purposes.. how do i enable
  tomcat to send an email to a user? Can version 4.01 do this or do u need
a
  newer version? ?
  Thanks..
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]