<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Email Provider Presets
    |--------------------------------------------------------------------------
    | Pre-configured IMAP/SMTP settings for popular email providers.
    | Users select a provider and only need to enter their email + password.
    */

    'presets' => [
        'gmail_imap' => [
            'label' => 'Gmail (IMAP/SMTP)',
            'icon' => 'mail',
            'description' => 'Connect Gmail using app password',
            'imap_host' => 'imap.gmail.com',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'smtp.gmail.com',
            'smtp_port' => 587,
            'smtp_encryption' => 'tls',
            'help_url' => 'https://support.google.com/accounts/answer/185833',
            'help_text' => 'Requires an App Password. Enable 2-Step Verification first.',
        ],
        // Legacy on-prem Exchange / Microsoft 365 with Basic Auth still
        // enabled by a tenant admin. NOT for outlook.com / hotmail.com /
        // live.com — Microsoft disabled Basic Auth on personal Microsoft
        // accounts in September 2022 and on Exchange Online in October
        // 2022. The UI hides this preset entirely when the email domain
        // looks like a personal MS address (see email-account-manager
        // blade) and steers the user to the Microsoft OAuth "Sign in
        // with Outlook" button instead.
        'outlook_imap' => [
            'label' => 'Exchange / Office 365 IMAP (legacy)',
            'icon' => 'mail',
            'description' => 'Legacy on-prem Exchange or tenants with Basic Auth still enabled. NOT for outlook.com / hotmail.com / live.com — use the Microsoft OAuth button instead.',
            'imap_host' => 'outlook.office365.com',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'smtp.office365.com',
            'smtp_port' => 587,
            'smtp_encryption' => 'tls',
            'help_text' => 'Personal Microsoft accounts (outlook.com / hotmail.com / live.com) cannot connect here — Microsoft disabled Basic Auth in 2022. Use the "Sign in with Outlook" OAuth button at the top of this page.',
        ],
        'yahoo' => [
            'label' => 'Yahoo Mail',
            'icon' => 'mail',
            'description' => 'Connect Yahoo Mail via IMAP',
            'imap_host' => 'imap.mail.yahoo.com',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'smtp.mail.yahoo.com',
            'smtp_port' => 465,
            'smtp_encryption' => 'ssl',
            'help_text' => 'Requires an App Password. Generate one in Yahoo Account Security settings.',
        ],
        'zoho' => [
            'label' => 'Zoho Mail',
            'icon' => 'mail',
            'description' => 'Connect Zoho Mail via IMAP',
            'imap_host' => 'imap.zoho.com',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'smtp.zoho.com',
            'smtp_port' => 465,
            'smtp_encryption' => 'ssl',
            'help_text' => 'Use your Zoho email and password. Enable IMAP in Zoho settings.',
        ],
        'icloud' => [
            'label' => 'iCloud Mail',
            'icon' => 'mail',
            'description' => 'Connect Apple iCloud Mail',
            'imap_host' => 'imap.mail.me.com',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'smtp.mail.me.com',
            'smtp_port' => 587,
            'smtp_encryption' => 'tls',
            'help_text' => 'Requires an app-specific password from appleid.apple.com.',
        ],
        'aol' => [
            'label' => 'AOL Mail',
            'icon' => 'mail',
            'description' => 'Connect AOL Mail via IMAP',
            'imap_host' => 'imap.aol.com',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'smtp.aol.com',
            'smtp_port' => 465,
            'smtp_encryption' => 'ssl',
            'help_text' => 'Requires an App Password from AOL account security.',
        ],
        'protonmail' => [
            'label' => 'ProtonMail Bridge',
            'icon' => 'mail',
            'description' => 'Connect ProtonMail via Bridge app',
            'imap_host' => '127.0.0.1',
            'imap_port' => 1143,
            'imap_encryption' => 'none',
            'smtp_host' => '127.0.0.1',
            'smtp_port' => 1025,
            'smtp_encryption' => 'none',
            'help_text' => 'Requires ProtonMail Bridge running locally on the server.',
        ],
        'fastmail' => [
            'label' => 'Fastmail',
            'icon' => 'mail',
            'description' => 'Connect Fastmail via IMAP',
            'imap_host' => 'imap.fastmail.com',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'smtp.fastmail.com',
            'smtp_port' => 465,
            'smtp_encryption' => 'ssl',
            'help_text' => 'Use an app password from Fastmail Settings > Privacy & Security.',
        ],
        'gmx' => [
            'label' => 'GMX Mail',
            'icon' => 'mail',
            'description' => 'Connect GMX Mail via IMAP',
            'imap_host' => 'imap.gmx.com',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'mail.gmx.com',
            'smtp_port' => 465,
            'smtp_encryption' => 'ssl',
            'help_text' => 'Enable IMAP access in GMX settings first.',
        ],
        'yandex' => [
            'label' => 'Yandex Mail',
            'icon' => 'mail',
            'description' => 'Connect Yandex Mail via IMAP',
            'imap_host' => 'imap.yandex.com',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'smtp.yandex.com',
            'smtp_port' => 465,
            'smtp_encryption' => 'ssl',
            'help_text' => 'Create an app password in Yandex Passport settings.',
        ],
        'mailru' => [
            'label' => 'Mail.ru',
            'icon' => 'mail',
            'description' => 'Connect Mail.ru via IMAP',
            'imap_host' => 'imap.mail.ru',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => 'smtp.mail.ru',
            'smtp_port' => 465,
            'smtp_encryption' => 'ssl',
            'help_text' => 'Generate an app password from Mail.ru Security settings.',
        ],
        'custom' => [
            'label' => 'Custom IMAP/SMTP',
            'icon' => 'settings',
            'description' => 'Enter custom IMAP and SMTP server details',
            'imap_host' => '',
            'imap_port' => 993,
            'imap_encryption' => 'ssl',
            'smtp_host' => '',
            'smtp_port' => 587,
            'smtp_encryption' => 'tls',
            'help_text' => 'Enter your email server details manually.',
        ],
    ],
];
