@ankaboot.io/imap-autoconfig
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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.

Package Sidebar

Install

npm i @ankaboot.io/imap-autoconfig

Weekly Downloads

55

Version

0.0.2

License

MIT

Unpacked Size

46.5 kB

Total Files

14

Last publish

Collaborators

  • zieddhf
  • maleksal