0.2.0 • Published 7 months ago

@ankaboot.io/imap-autoconfig v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

imap-autoconfig

Detects e-mail connection settings for a given email address.

Installation

Install the package using NPM:

npm i @ankaboot.io/imap-autoconfig

Usage

import IMAPSettingsDetector from 'imap-autoconfig';

const detector = new IMAPSettingsDetector();

async function getIMAPSettings(email) {
    try {
        const settings = await detector.detect(email);
        console.log(settings);
    } catch (error) {
        console.error('Error detecting IMAP settings:', error);
    }
}

const email = 'example@example.com';
getIMAPSettings(email);

Response Data Object:

The response from the detect method is an object with the following properties:

  • host: The IMAP server hostname.
  • port: The port number to connect to the host.
  • secure: A boolean indicating if the connection should use SSL (typically true for port 993 and false for port 143).

Example Response:

{ 
    "host": "imap.mail.yahoo.com",
    "port": 993,
    "secure": true
}

Credits

This project is a fork of the original imap-autoconfig created by Andris Reinman.

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Support

If you encounter any issues or have questions, please open an issue on GitHub.

0.2.0

7 months ago

0.1.2

9 months ago

0.1.1

12 months ago

0.1.0

12 months ago

0.0.2

1 year ago

0.0.1

1 year ago

1.0.0

1 year ago