Files
AI-Studio/app/MindWork AI Studio/Tools/Mail/MailboxProviderTemplates.cs
T
Thorsten Sommer c4400c0ff6
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Added mailboxes as local data sources (#1022)
2026-10-04 12:26:26 +02:00

44 lines
4.2 KiB
C#

using AIStudio.Settings.DataModel;
namespace AIStudio.Tools.Mail;
/// <summary>
/// The IMAP settings of well-known providers, read from their own documentation.
/// </summary>
/// <remarks>
/// A fixed table on purpose: AI Studio never asks a third party which server belongs to an
/// address, since that would tell it whose mailbox is being set up. Each entry was checked against
/// the help pages of the provider on 2026-10-01. When the provider documents more than one way to
/// connect, the entry takes the one it recommends, or TLS from the first byte on.<br/><br/>
/// Microsoft 365 and Outlook.com are missing on purpose: they no longer accept a password over
/// IMAP, only a sign-in with Microsoft.<br/><br/>
/// The logos come from Simple Icons, see the README next to them. STRATO, Posteo, and Microsoft
/// Exchange Server have none there, so they go without.
/// </remarks>
public static class MailboxProviderTemplates
{
private const int IMAPS_PORT = MailboxTransportSecurityExtensions.SSL_ON_CONNECT_PORT;
private const string ICON_ROOT = "/images/provider-icons";
public static readonly IReadOnlyList<MailboxProviderTemplate> ALL =
[
// Google allows app passwords only with 2-Step Verification, and recommends a sign-in with Google instead:
new("Gmail", "imap.gmail.com", IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.EMAIL_ADDRESS, MailboxProviderRequirements.APP_PASSWORD, "https://support.google.com/accounts/answer/185833", $"{ICON_ROOT}/gmail.svg"),
new("GMX", "imap.gmx.net", IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.EMAIL_ADDRESS, MailboxProviderRequirements.IMAP_ACTIVATION | MailboxProviderRequirements.APP_PASSWORD_WITH_TWO_FACTOR, "https://hilfe.gmx.net/pop-imap/einschalten.html", $"{ICON_ROOT}/gmx.svg"),
new("WEB.DE", "imap.web.de", IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.EMAIL_ADDRESS, MailboxProviderRequirements.IMAP_ACTIVATION | MailboxProviderRequirements.APP_PASSWORD_WITH_TWO_FACTOR, "https://hilfe.web.de/pop-imap/einschalten.html", $"{ICON_ROOT}/web-de.svg"),
new("IONOS", "imap.ionos.de", IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.EMAIL_ADDRESS, MailboxProviderRequirements.NONE, "https://www.ionos.de/hilfe/e-mail/allgemeine-themen/serverinformationen-fuer-imap-pop3-und-smtp/", $"{ICON_ROOT}/ionos.svg"),
new("STRATO", "imap.strato.de", IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.EMAIL_ADDRESS, MailboxProviderRequirements.NONE, "https://www.strato.de/faq/mail/so-lauten-die-strato-e-mail-server", string.Empty),
new("mailbox.org", "imap.mailbox.org", IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.EMAIL_ADDRESS, MailboxProviderRequirements.APP_PASSWORD_WITH_TWO_FACTOR, "https://kb.mailbox.org/en/private/e-mail/e-mail-configuration/", $"{ICON_ROOT}/mailbox-org.svg"),
new("Hetzner (konsoleH)", "mail.your-server.de", IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.EMAIL_ADDRESS, MailboxProviderRequirements.NONE, "https://docs.hetzner.com/de/konsoleh/account-management/email/setting-up-an-email-account/", $"{ICON_ROOT}/hetzner.svg"),
// The host is the same for every address at Posteo, whatever its domain:
new("Posteo", "posteo.de", IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.EMAIL_ADDRESS, MailboxProviderRequirements.NONE, "https://posteo.de/en/help/how-do-i-set-up-posteo-in-an-email-client-pop3-imap-and-smtp", string.Empty),
new("iCloud Mail", "imap.mail.me.com", IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.ADDRESS_NAME_PART, MailboxProviderRequirements.APP_PASSWORD, "https://support.apple.com/en-us/102654", $"{ICON_ROOT}/icloud.svg"),
// Every organization runs a server of its own, and IMAP ships switched off:
new("Microsoft Exchange Server", string.Empty, IMAPS_PORT, MailboxTransportSecurity.SSL_ON_CONNECT, MailboxUsernameFormat.DOMAIN_ACCOUNT, MailboxProviderRequirements.ADMIN_ACTIVATION, "https://learn.microsoft.com/en-us/exchange/clients/pop3-and-imap4/configure-imap4", string.Empty),
];
}