npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-imap-mail-fix

v1.1.4

Published

This plugin will enable a Cordova application to use the IMAP (Internet Message Access Protocol) features.

Downloads

7

Readme

Cordova IMAP plugin

This plugin will enable a Cordova application to use the IMAP (Internet Message Access Protocol) features. The plugin offers support for Android and iOS. To enable the IMAP features on Android, this plugin uses the framework Java Mail API and for iOS, it uses the MailCore 2 library.

Supported Platforms

  • Android
  • iOS

Installation

Install the plugin by running:

cordova plugin add cordova-plugin-imap

How to install on Ionic

More info for installation on Ionic including import examples on: Awesome Cordova Plugins

Cordova

# NOTE: Install Core library (once per project)
npm install @awesome-cordova-plugins/core

# Install the IMAP plugin
ionic cordova plugin add cordova-plugin-imap

# Install the Awesome Cordova Plugins TypeScript wrapper
npm install @awesome-cordova-plugins/imap

Capacitor

# NOTE: Install Core library (once per project)
npm install @awesome-cordova-plugins/core

# Install the IMAP plugin
npm install cordova-plugin-imap

# Install the Awesome Cordova Plugins TypeScript wrapper
npm install @awesome-cordova-plugins/imap

# Update native platform project(s) to include newly added plugin
ionic cap sync

API

  • connect(config, success, error) - (Connection) - Tries to connect and authenticate with the IMAP server.
  • disconnect(success, error) - (boolean) - Closes the connection with the server.
  • isConnected(success, error) - (boolean) - Checks the current state of the connection.
  • listMailFolders(pattern, success, error) - (string[]) - Lists the name of all the mail folders in the mailbox.
  • getMessageCountByFolderName(folderName, success, error) - (number) - Gets the count of the messages in the folder.
  • searchMessagesByDatePeriod(folderName, dateInMilliseconds, comparison : enum, success, error) - (number[]) - Returns the messages' consecutive numbers.
  • listMessagesHeadersByConsecutiveNumber(folderName, start, end, success, error) - (MessageHeaders[]) - Returns messages' headers data.
  • listMessagesHeadersByDate(folderName, dateInMilliseconds, comparison : enum, success, error) - (MessageHeaders[]) - Returns messages' headers data.
  • getFullMessageData(folderName, messageNumber, success, error) - (Message) - Returns the full message data inclucing its attachments.
  • getFullMessageDataOnNewSession(config, folderName, messageNumber, success, error) - (Message) - Returns the full message data inclucing its attachments.
  • copyToFolder (sourceFolder, destinationFolder, messageNums, success, error) - (boolean) - Copy messages to a desired folder
  • setFlag (folderName, messageNums, flag : enum, status, success, error) - (ModificationResult) - Sets a flag on a message. This method can also be used for deleting messages.

Data types

Config

| Param | Type | Description | | --- | --- | --- | | host | string | Hostname or IP address of the IMAP service. | | port | number | Optional. Port of the IMAP server to connect. Default set to: 993 | | connectionType | ConnectionType | iOS ONLY. Optional. Encryption type to use. Default set to: TLS/SSL | | user | string | Username or email address for authentication. | | password | string | Password for authentication. |

ConnectionType enum

| Name | Type | Description | | --- | --- | --- | | Clear | MCOConnectionType | Clear-text connection for the protocol. | | StartTLS | MCOConnectionType | Start with clear-text connection at the beginning, then switch to encrypted connection using TLS/SSL | | TLS/SSL | MCOConnectionType | Encrypted connection using TLS/SSL |

Connection

| Param | Type | Description | | --- | --- | --- | | status | boolean | Connection status. | | connection | string | Optional. Connection String result, returned when the connection is established successfully. | | exception | string | Optional. Exception details, in case an error occurs. |

MessageHeaders

| Param | Type | Description | | --- | --- | --- | | messageNumber | number | Message consecutive number. | | folder | string | The name of the message's folder. | | from | Array<Address> | Sender's data. | | toRecipients | Array<Address> | TO recipients data. | | ccRecipients | Array<Address> | CC recipients data. | | bccRecipients | Array<Address> | BCC recipients data. | | receivedDate | string | The date when the message was received. | | subject | string | Message's subject. | | flags | Array<string> | Message's active flags |

Message

| Param | Type | Description | | --- | --- | --- | | messageNumber | number | Message consecutive number. | | folder | string | The name of the message's folder. | | from | Array<Address> | Sender's data. | | allRecipients | Array<Address> | All recipients data. | | toRecipients | Array<Address> | TO recipients data. | | ccRecipients | Array<Address> | CC recipients data. | | bccRecipients | Array<Address> | BCC recipients data. | | replyTo | Array<Address> | Reply data. | | sentDate | string | The date when the message was sent. | | receivedDate | string | The date when the message was received. | | subject | string | Message's subject. | | description | string | Android ONLY. Optional. Short description. | | fileName | string | / | | disposition | string | Android ONLY. Optional. / | | flags | Array<string> | Message's active flags | | lineCount | number | Android ONLY. Optional. / | | allMessageHeaders | object | Android ONLY. Optional. All Headers available on a message | | contentType | string | Android ONLY. Optional. Type of message's content | | bodyContent | Array<Content> | Message's body with its content and attachments. | | size | number | Message's memory size |

Address

| Param | Type | Description | | --- | --- | --- | | address | string | Email address | | personal | string | Optional. Name of the email address's owner. | | type | string | Android ONLY. Optional. Data type |

Content

| Param | Type | Description | | --- | --- | --- | | type | string | Content data type | | fileName | string | Optional. The name of the file | | content | string | Message's content |

ModificationResult

| Param | Type | Description | | --- | --- | --- | | status | boolean | Status of the applied changes | | modifiedMessages | Array<number> | Array with consecutive numbers of modified messages |

Flag : enum

Defines a flag that can be added or removed from a message.

Note: Some flags are available only for a particular platform

Kind: static enum property of flag
Available Flags

| Name | Type | Description | | --- | --- | --- | | ANSWERED | Flags.Flag / MCOMessageFlag | "ANSWERED" message flag | | DRAFT | Flags.Flag / MCOMessageFlag | "DRAFT" message flag | | FLAGGED | Flags.Flag / MCOMessageFlag | "FLAGGED" message flag | | RECENT | Flags.Flag | Android ONLY. "RECENT" message flag | | SEEN | Flags.Flag / MCOMessageFlag | "SEEN" message flag | | USER | Flags.Flag | Android ONLY. "USER" message flag | | DELETED | Flags.Flag / MCOMessageFlag | "DELETED" message flag. Note: Add this flag to delete the message from the mailbox | | SENT | MCOMessageFlag | iOS ONLY. "SENT" message flag | | FORWARDED | MCOMessageFlag | iOS ONLY. "FORWARDED" message flag | | SubmitPending | MCOMessageFlag | iOS ONLY. "SubmitPending" message flag | | SUBMITTED | MCOMessageFlag | iOS ONLY. "SUBMITTED" message flag |

ComparisonTerm : enum

Comparison Operators. Used for listing messages by date period.

Note: Some operators are available only for a particular platform

Kind: static enum property of comparison
Available Operators

| Name | Type | Description | | --- | --- | --- | | LE | ReceivedDateTerm | Android ONLY. The less than or equal to operator. | | LT | ReceivedDateTerm / MCOIMAPSearchExpression | The less than operator. | | EQ | ReceivedDateTerm / MCOIMAPSearchExpression | The equality operator. | | NE | ReceivedDateTerm / MCOIMAPSearchExpression | The not equal to operator. | | GT | ReceivedDateTerm | Android ONLY. The greater than operator. | | GE | ReceivedDateTerm / MCOIMAPSearchExpression | The greater than or equal to operator. |

License

ISC

Thank you

Thank you for using this plugin. If you have any suggestions on how we can improve the plugin (missing feature or bug...), feel free to contact us.