how to change default SMTP port 25 in java mail?

2003-12-16 Thread N.B.Bopanna
hi all,
i am using java mail in my webapp.
my client does'nt  want to use default SMTP port 25.
i have to use port specified by client.
the project is on tomcat-4.1.29.
can some one give me sample code to do this?
Thanks
Bopanna



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



Re: how to change default SMTP port 25 in java mail?

2003-12-16 Thread Christopher Schultz
Bopanna,

1. This is not related to Tomcat. Please try a JavaMail list next time.

2. RTFM: 
http://java.sun.com/products/javamail/javadocs/overview-summary.html

Search the page for port.

-chris

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


Re: how to change default SMTP port 25 in java mail?

2003-12-16 Thread Mark R. Diggory
This is not off topic for the tomcat user list Chris. How would one do 
this in tomcats configuration? By adding an environmental variable to 
resource configuration in the server.xml file of tomcat. A proper 
subject for the tomcat user list indeed.

See the configuration doc for tomcat if you have further questions on 
configuring the javamail resource in tomcat's server.xml

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html

here's an example, the reference that Chris provides details all the 
parameters you can set for the Mail Session via this method.

Context ...
  ...
  Resource name=mail/Session auth=Container
type=javax.mail.Session/
  ResourceParams name=mail/Session
parameter
  namemail.smtp.host/name
  valuelocalhost/value
/parameter
parameter
  namemail.smtp.port/name
  value25/value
/parameter
  /ResourceParams
  ...
/Context
Cheers,
Mark
Christopher Schultz wrote:

Bopanna,

1. This is not related to Tomcat. Please try a JavaMail list next time.

2. RTFM: 
http://java.sun.com/products/javamail/javadocs/overview-summary.html

Search the page for port.

-chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Mark Diggory
Software Developer
Harvard MIT Data Center
http://osprey.hmdc.harvard.edu
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]