Dashing widget to display the number of unread emails in an IMAP mailbox.
##Usage
To use this widget, copy mailchecker.coffee, mailchecker.html, and mailchecker.scss into the /widgets/mailchecker directory. Put the mailchecker.rb file in your /jobs folder.
To include the widget in a dashboard, add the following to your dashboard layout file:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="mailchecker" data-view="Mailchecker" data-title="Unread Emails"></div>
<i class="icon-envelope icon-background"></i> <!-- optional: displays an envelope icon in the background -->
</li>
##Settings
-
Assuming that you have
Dotenvset up, add the following to a.envfile in your project folderMAILCHECKER_HOSTNAME: _imap_hostname*_ MAILCHECKER_PORT: _imap_port_ MAILCHECKER_SSL: _imap_ssl_bool_ MAILCHECKER_USERNAME: _imap_username*_ MAILCHECKER_PASSWORD: _imap_password*_ MAILCHECKER_MAILBOX: _imap_mailbox_ -
The settings marked with
*are required, you can optionally setMAILCHECKER_PORTwhich defaults to143, andMAILCHECKER_MAILBOXwhich defaults toINBOX -
Use
MAILCHECKER_SSLto set a boolean value to enable secure IMAP connections (disabled by default) -
Default schedule set to check for unread emails every 10 minutes but can be changed from within mailchecker.rb.