Skip to content

ankaboot-source/imap-autoconfig

 
 

Repository files navigation

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 = '[email protected]';
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.

About

Discover IMAP settings for an user

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.8%
  • JavaScript 1.2%