Browse Source
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@130 3d1905a2-6b24-0410-a738-b14d5a86fcbdmaster

6 changed files with 104 additions and 16 deletions
Binary file not shown.
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
package davmail.web; |
||||
|
||||
import davmail.Settings; |
||||
import davmail.DavGateway; |
||||
import davmail.tray.DavGatewayTray; |
||||
|
||||
import javax.servlet.ServletContextListener; |
||||
import javax.servlet.ServletContextEvent; |
||||
import java.io.InputStream; |
||||
import java.io.IOException; |
||||
|
||||
/** |
||||
* Context Listener to start/stop DavMail |
||||
*/ |
||||
public class DavGatewayServletContextListener implements ServletContextListener { |
||||
public void contextInitialized(ServletContextEvent event) { |
||||
InputStream settingInputStream = null; |
||||
try { |
||||
settingInputStream = DavGatewayServlet.class.getClassLoader().getResourceAsStream("davmail.properties"); |
||||
Settings.load(settingInputStream); |
||||
DavGateway.start(); |
||||
} catch (IOException e) { |
||||
DavGatewayTray.error("Error loading settings file from classpath: ", e); |
||||
} finally { |
||||
if (settingInputStream != null) { |
||||
try { |
||||
settingInputStream.close(); |
||||
} catch (IOException e) { |
||||
DavGatewayTray.debug("Error closing configuration file: ", e); |
||||
} |
||||
} |
||||
} |
||||
DavGatewayTray.debug("DavMail Gateway started"); |
||||
} |
||||
|
||||
public void contextDestroyed(ServletContextEvent event) { |
||||
DavGatewayTray.debug("Stopping DavMail Gateway..."); |
||||
DavGateway.stop(); |
||||
} |
||||
} |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
davmail.url=http://exchangeServer/exchange/ |
||||
davmail.popPort=1110 |
||||
davmail.smtpPort=1025 |
||||
davmail.keepDelay=30 |
||||
davmail.allowRemote=true |
||||
davmail.enableProxy=false |
||||
davmail.proxyHost= |
||||
davmail.proxyPort= |
||||
davmail.proxyUser= |
||||
davmail.proxyPassword= |
||||
davmail.server=true |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee |
||||
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" |
||||
version="2.5"> |
||||
<description> |
||||
Ever wanted to get rid of Outlook ? DavMail is a POP/SMTP exchange gateway allowing |
||||
users to use any mail client (e.g. Thunderbird) with an Exchange server, even from the internet |
||||
through Outlook Web Access. DavMail gateway is implemented in java and should run on |
||||
any platform. Releases are tested on Windows and Linux (Ubuntu). MacOS support is currently |
||||
limited to server (headless) mode. Tested successfully with the Iphone (gateway running on a |
||||
server). |
||||
</description> |
||||
<listener> |
||||
<listener-class>davmail.web.DavGatewayServletContextListener</listener-class> |
||||
</listener> |
||||
</web-app> |
Loading…
Reference in new issue