RE: Newbie: Java Mail Problem

2002-12-30 Thread Burden, Parker
David-

It looks like something strange is happening with your configuration.  I am
not familiar with the example that you are talking about, but if you look at
the exception, it looks like it is trying to connect to port 25 (smtp) of
localhost, and not your verizon SMTP server.  Localhost normally resolves to
your own machine (your XP box in this case), and I doubt you have an SMTP
server running there, and thus the connection failure.

Perhaps there is another location you must use to specify the verizon
server?  On a related note, be prepared to potentially have problems once
you have the example pointed to the right server.  Not all servers allow
ad-hoc connections to their SMTP server.  If you find yourself in this
boat (it pointing to verizon but still getting connection failures) let me
know and I can try to step you through debugging SMTP connectivity errors.


Parker Burden
Senior Systems Engineer JC4I/INRI/DMS
757-249-1234
[EMAIL PROTECTED]
 

-Original Message-
From: David Diskin [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, December 28, 2002 4:32 PM
To: [EMAIL PROTECTED]
Subject: Newbie: Java Mail Problem

I've just set up Tomcat  4.1.18 on my Windows XP Home  PC.   I installed 
it as a service.  I have no problem connecting to the Tomcat main web 
page.  I reconfigured conf/server.xml and changed to value of 
mail.smtp.host to smtp.verizon.net, my  isp mail server.  However, 
when I go to run the jsp send mail example, I get the following 
exception.  Can anyone help on  this?
==
ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; 
nested exception is: javax.mail.MessagingException: Could not connect to 
SMTP host: localhost, port: 25; nested exception is: 
java.net.ConnectException: Connection refused: connect

javax.mail.SendFailedException: Sending failed;
  nested exception is: 
javax.mail.MessagingException: Could not connect to SMTP host:
localhost, port: 25;
  nested exception is: 
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at SendMailServlet.doPost(SendMailServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at

RE: Newbie: Java Mail Problem

2002-12-30 Thread Turner, John
 
On that note, if you're using Windows 2000 and XP Professional, you can
simply install a SMTP service on your computer.  It's part of IIS, though,
which means you'll have to install that if you haven't already.

If you want to see if you have it installed, goto Start-Control
Panel-Administrative Tools.  If you have it installed, you should see a
shortcut there that says Internet Information Services.  Open that up, and
you can configure both IIS and any of it's related services, including SMTP.

If you don't have it installed, and want to install it, goto Start-Control
Panel-Add or Remove Programs and click on Add/Remove Windows Components.
You'll be shown a list of things that you can install, one of which is IIS.

Might be overkill, though, and if you do install it or have it running, you
want to make EXTRA sure your computer isn't visible to the outside world on
port 25.  You can configure the SMTP service to deny connections from
anything but localhost, for example.

John




-Original Message-
From: Burden, Parker
To: Tomcat Users List
Sent: 12/30/02 8:56 AM
Subject: RE: Newbie: Java Mail Problem

David-

It looks like something strange is happening with your configuration.  I
am
not familiar with the example that you are talking about, but if you
look at
the exception, it looks like it is trying to connect to port 25 (smtp)
of
localhost, and not your verizon SMTP server.  Localhost normally
resolves to
your own machine (your XP box in this case), and I doubt you have an
SMTP
server running there, and thus the connection failure.

Perhaps there is another location you must use to specify the verizon
server?  On a related note, be prepared to potentially have problems
once
you have the example pointed to the right server.  Not all servers allow
ad-hoc connections to their SMTP server.  If you find yourself in this
boat (it pointing to verizon but still getting connection failures) let
me
know and I can try to step you through debugging SMTP connectivity
errors.


Parker Burden
Senior Systems Engineer JC4I/INRI/DMS
757-249-1234
[EMAIL PROTECTED]
 

-Original Message-
From: David Diskin [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, December 28, 2002 4:32 PM
To: [EMAIL PROTECTED]
Subject: Newbie: Java Mail Problem

I've just set up Tomcat  4.1.18 on my Windows XP Home  PC.   I installed

it as a service.  I have no problem connecting to the Tomcat main web 
page.  I reconfigured conf/server.xml and changed to value of 
mail.smtp.host to smtp.verizon.net, my  isp mail server.  However, 
when I go to run the jsp send mail example, I get the following 
exception.  Can anyone help on  this?
==
ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; 
nested exception is: javax.mail.MessagingException: Could not connect to

SMTP host: localhost, port: 25; nested exception is: 
java.net.ConnectException: Connection refused: connect

javax.mail.SendFailedException: Sending failed;
  nested exception is: 
javax.mail.MessagingException: Could not connect to SMTP host:
localhost, port: 25;
  nested exception is: 
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at SendMailServlet.doPost(SendMailServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base
.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
5)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180
)
at
org.apache.catalina.core.StandardPipeline

Re: Newbie: Java Mail Problem

2002-12-30 Thread David Diskin
Parker,

Hi.  What a surprise to get a reply from someone I actually know.   I 
solved the problem, but I forgot to notify the list.  It turned out 
that Tomcat wasn't actually shut down and restarted properly.  Now, it 
works fine.  Have a happy New Year!

David

Burden, Parker wrote:

David-

It looks like something strange is happening with your configuration.  I am
not familiar with the example that you are talking about, but if you look at
the exception, it looks like it is trying to connect to port 25 (smtp) of
localhost, and not your verizon SMTP server.  Localhost normally resolves to
your own machine (your XP box in this case), and I doubt you have an SMTP
server running there, and thus the connection failure.

Perhaps there is another location you must use to specify the verizon
server?  On a related note, be prepared to potentially have problems once
you have the example pointed to the right server.  Not all servers allow
ad-hoc connections to their SMTP server.  If you find yourself in this
boat (it pointing to verizon but still getting connection failures) let me
know and I can try to step you through debugging SMTP connectivity errors.


Parker Burden
Senior Systems Engineer JC4I/INRI/DMS
757-249-1234
[EMAIL PROTECTED]


-Original Message-
From: David Diskin [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, December 28, 2002 4:32 PM
To: [EMAIL PROTECTED]
Subject: Newbie: Java Mail Problem

I've just set up Tomcat  4.1.18 on my Windows XP Home  PC.   I installed 
it as a service.  I have no problem connecting to the Tomcat main web 
page.  I reconfigured conf/server.xml and changed to value of 
mail.smtp.host to smtp.verizon.net, my  isp mail server.  However, 
when I go to run the jsp send mail example, I get the following 
exception.  Can anyone help on  this?
==
ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; 
nested exception is: javax.mail.MessagingException: Could not connect to 
SMTP host: localhost, port: 25; nested exception is: 
java.net.ConnectException: Connection refused: connect

javax.mail.SendFailedException: Sending failed;
 nested exception is: 
	javax.mail.MessagingException: Could not connect to SMTP host:
localhost, port: 25;
 nested exception is: 
	java.net.ConnectException: Connection refused: connect
	at javax.mail.Transport.send0(Transport.java:219)
	at javax.mail.Transport.send(Transport.java:81)
	at SendMailServlet.doPost(SendMailServlet.java:75)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:493)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at

Re: Newbie: Java Mail Problem

2002-12-30 Thread David Diskin
I resolved the problem.  It turns out that I had not really stopped and 
restarted the Tomcat service after reconfiguring server.xml, even though 
I thought I had.   Now, it works fine.  Thanks everyone!

David

Burden, Parker wrote:

David-

It looks like something strange is happening with your configuration.  I am
not familiar with the example that you are talking about, but if you look at
the exception, it looks like it is trying to connect to port 25 (smtp) of
localhost, and not your verizon SMTP server.  Localhost normally resolves to
your own machine (your XP box in this case), and I doubt you have an SMTP
server running there, and thus the connection failure.

Perhaps there is another location you must use to specify the verizon
server?  On a related note, be prepared to potentially have problems once
you have the example pointed to the right server.  Not all servers allow
ad-hoc connections to their SMTP server.  If you find yourself in this
boat (it pointing to verizon but still getting connection failures) let me
know and I can try to step you through debugging SMTP connectivity errors.


Parker Burden
Senior Systems Engineer JC4I/INRI/DMS
757-249-1234
[EMAIL PROTECTED]


-Original Message-
From: David Diskin [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, December 28, 2002 4:32 PM
To: [EMAIL PROTECTED]
Subject: Newbie: Java Mail Problem

I've just set up Tomcat  4.1.18 on my Windows XP Home  PC.   I installed 
it as a service.  I have no problem connecting to the Tomcat main web 
page.  I reconfigured conf/server.xml and changed to value of 
mail.smtp.host to smtp.verizon.net, my  isp mail server.  However, 
when I go to run the jsp send mail example, I get the following 
exception.  Can anyone help on  this?
==
ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; 
nested exception is: javax.mail.MessagingException: Could not connect to 
SMTP host: localhost, port: 25; nested exception is: 
java.net.ConnectException: Connection refused: connect

javax.mail.SendFailedException: Sending failed;
 nested exception is: 
	javax.mail.MessagingException: Could not connect to SMTP host:
localhost, port: 25;
 nested exception is: 
	java.net.ConnectException: Connection refused: connect
	at javax.mail.Transport.send0(Transport.java:219)
	at javax.mail.Transport.send(Transport.java:81)
	at SendMailServlet.doPost(SendMailServlet.java:75)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:493)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at

Re: Newbie: Java Mail Problem

2002-12-28 Thread Steve R Burrus
 David, u might call or label yourself a Newbie, but you got me beat on being
able to connect Tomcat to the Apache Server!! How the hell do you do it?!!
Incidentally, I have the version 4.1.16 of tomcat, and the version 2.04* of the
Apache HTTP server FYI!

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: Newbie: Java Mail Problem

2002-12-28 Thread Paul Campbell
In/localhost:8080/examples/jsp/mail/sendmail.txt

it notes that the assumption is that no user authentication is required.
Is it reasonable to assume that verizon.net will expect user authentication?

--
titleExample Mail Sending Form/title
/head
body bgcolor=white

pThis page will send an electronic mail message via the
codejavax.mail.Session/code resource factory that is configured into
the JNDI context for this web application.  Before it can be used
successfully, you must take note of the following:/p
ul
liThe default configuration assumes that there is an SMTP server running
on stronglocalhost/strong.  If this is not the case, edit your
codeconf/server.xml/code file and change the value for the
codemail.smtp.host/code parameter to the name of a host that provides
SMTP service for your network./li
liThe application logic assumes that no user authentication is required
by your SMTP server before accepting mail messages to be sent./li
At 04:32 PM 12/28/2002 -0500, you wrote:
I've just set up Tomcat  4.1.18 on my Windows XP Home  PC.   I installed it as a 
service.  I have no problem connecting to the Tomcat main web page.  I reconfigured 
conf/server.xml and changed to value of mail.smtp.host to smtp.verizon.net, my  isp 
mail server.  However, when I go to run the jsp send mail example, I get the 
following exception.  Can anyone help on  this?
==
ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested 
exception is: javax.mail.MessagingException: Could not connect to SMTP host: 
localhost, port: 25; nested exception is: java.net.ConnectException: Connection 
refused: connect


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




Re: Newbie: Java Mail Problem

2002-12-28 Thread Denis Haskin
From the error, looks like it's still trying to connect to an smtp 
server at localhost.  Did you restart Tomcat after changing mail.smtp.host?

dwh

David Diskin wrote:

I've just set up Tomcat  4.1.18 on my Windows XP Home  PC.   I 
installed it as a service.  I have no problem connecting to the Tomcat 
main web page.  I reconfigured conf/server.xml and changed to value of 
mail.smtp.host to smtp.verizon.net, my  isp mail server.  However, 
when I go to run the jsp send mail example, I get the following 
exception.  Can anyone help on  this?
==
ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; 
nested exception is: javax.mail.MessagingException: Could not connect 
to SMTP host: localhost, port: 25; nested exception is: 
java.net.ConnectException: Connection refused: connect



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




Re: Newbie: Java Mail Problem

2002-12-28 Thread David Diskin
yes, I stopped and restarted the Tomcat service.

Denis Haskin wrote:


From the error, looks like it's still trying to connect to an smtp 
server at localhost.  Did you restart Tomcat after changing 
mail.smtp.host?

dwh

David Diskin wrote:

I've just set up Tomcat  4.1.18 on my Windows XP Home  PC.   I 
installed it as a service.  I have no problem connecting to the 
Tomcat main web page.  I reconfigured conf/server.xml and changed to 
value of mail.smtp.host to smtp.verizon.net, my  isp mail server.  
However, when I go to run the jsp send mail example, I get the 
following exception.  Can anyone help on  this?
==
ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending 
failed; nested exception is: javax.mail.MessagingException: Could not 
connect to SMTP host: localhost, port: 25; nested exception is: 
java.net.ConnectException: Connection refused: connect



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





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




Re: Newbie: Java Mail Problem

2002-12-28 Thread Shawn Furgason
David,
A troubleshooting idea.  I'd isolate this problem by ensuring you
can communicate directly via javamail.  Try a simple test such as this
(in a JSP will work fine)...

String host = smtp.verizon.net;
String from = [EMAIL PROTECTED];
String to = [EMAIL PROTECTED];

// Get system properties
Properties props = System.getProperties();

// Setup mail server
props.put(mail.smtp.host, host);

// Get session
Session mailsession = Session.getDefaultInstance(props, null);

// Define message
MimeMessage message = new MimeMessage(mailsession);

// Set the from address
message.setFrom(new InternetAddress(from));

// Set the to address
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));

// Set the subject
message.setSubject(Test message);

// Set the content
message.setText(Testing);

// Send message
Transport.send(message);

If this works.. then I'd suspect something in TC or your config.  If it
doesn't.. you might want to post this info. to the javamail list.  Lots
of helpful people over there.

Good luck,
Shawn.

 yes, I stopped and restarted the Tomcat service.

 Denis Haskin wrote:

 From the error, looks like it's still trying to connect to an smtp
 server at localhost.  Did you restart Tomcat after changing
 mail.smtp.host?

 dwh

 David Diskin wrote:

 I've just set up Tomcat  4.1.18 on my Windows XP Home  PC.   I
 installed it as a service.  I have no problem connecting to the
 Tomcat main web page.  I reconfigured conf/server.xml and changed to
  value of mail.smtp.host to smtp.verizon.net, my  isp mail server.
   However, when I go to run the jsp send mail example, I get the
 following exception.  Can anyone help on  this?
 ==
 ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending
 failed; nested exception is: javax.mail.MessagingException: Could
 not
  connect to SMTP host: localhost, port: 25; nested exception is:
 java.net.ConnectException: Connection refused: connect



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





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




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