|
From: Leif M. <le...@ta...> - 2005-11-06 11:38:04
|
Hakan, How are the SMTP settings being configured in your application? There shouldn't be anything about the Wrapper that would prevent you from connecting to your mail server if it is being configured correctly. Try adding the wrapper.debug=true property and verify that the command line being used to launch the JVM contains all of the expected values. A common problem is problems with environment variables. Make sure that any variables your application needs are defined system wide and not just for your user. Cheers, Leif Håkan Fransson wrote: >Hi! >I’m just started to use the wrapper to make a Windows service of my java >application. It works perfectly when >i run it as a consle but when i’m try to send an email with wrapper as a >windows service i get: > >javax.mail.MessagingException: Could not connect to SMTP host: >mail.steencon.se, port: 25; > nested exception is: > java.net.ConnectException: Connection refused: connect > at >com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1227) > at >com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:322) > at javax.mail.Service.connect(Service.java:236) > at javax.mail.Service.connect(Service.java:137) > at javax.mail.Service.connect(Service.java:86) > at javax.mail.Transport.send0(Transport.java:150) > at javax.mail.Transport.send(Transport.java:80) > at >se.cesp.delivery.common.util.EmailCommunicator.send(EmailCommunicator.java:1 >88) > at >se.cesp.delivery.impl.OfferWebbEmail.execute(OfferWebbEmail.java:95) > at >se.cesp.delivery.common.util.DeliveryInvoker.run(DeliveryInvoker.java:81) > at java.lang.Thread.run(Thread.java:534) > >It doesn’t matter i run the service with system account or administrator(as >with console), it’s the same >result. >The java application also uses FTP and it works fine in both ways. >Any ideas? > >Thanks in advance Håkan > >---------------------------------------------------------------- >Håkan Fransson Phone: +46(0)90 - 786 74 93 >Ladokenheten Fax: +46(0)90 - 786 69 91 >Umeå University www: www.umu.se/ladokenheten >SE - 90187 Umeå >------------------------------------------------------------- > > |