Microsoft Outlook, the mistress of many a company - requiring constant attention, and preventing you from using an email client that you actually like (like Alpine).

I'm one of those weird people who love the command line. It's in my blood. I highly dislike having to use outlook, especially since they're perfectly willing to allow access through OWA. So I stumbled across DavMail which seemed like the perfect solution. But looking through the setup instructions, it didn't seem like there were any command line options.

And worst of all, when I try to run ./davmail.sh at the command line I get this message:

Exception in thread "SWT" org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
        at org.eclipse.swt.SWT.error(Unknown Source)
        at org.eclipse.swt.widgets.Display.createDisplay(Unknown Source)
        at org.eclipse.swt.widgets.Display.create(Unknown Source)
        at org.eclipse.swt.graphics.Device.<init>(Unknown Source)
        at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
        at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
        at davmail.ui.tray.SwtGatewayTray$5.run(SwtGatewayTray.java:196)

Which looks an awful lot like an error with it trying to display the tray icon, which I don't have since I'm logged in over SSH. It also appeared not to do anything else - I tried telnetting into the IMAP/POP ports listed in ~/.davmail.properties but got 'Connection refused'.

I wasn't able to find anything in the docs about running only from the command line. That brings me to my question:

Can I run DavMail in a command-line mode, OR are there any other (preferably good) command line interfaces to the OWA?


You need to create a Davmail.properties file and call Davmail with that on the command-line. It is described nicely here:


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.