fix(email): IMAP Security dropdown matches outgoing — no port in label, manual port
Reverts the auto-fill; drops the (993)/(143) from the Security option labels so incoming behaves exactly like the outgoing SMTP card (plain SSL/TLS vs STARTTLS, port set manually).
This commit is contained in:
@@ -30,20 +30,6 @@ export const IncomingMailConfigCard: React.FC = () => {
|
|||||||
|
|
||||||
const set = (k: keyof IncomingMailConfig, v: any) => setCfg((c) => ({ ...c, [k]: v }));
|
const set = (k: keyof IncomingMailConfig, v: any) => setCfg((c) => ({ ...c, [k]: v }));
|
||||||
|
|
||||||
// Changing Security auto-fills the conventional IMAP port (SSL/TLS → 993,
|
|
||||||
// STARTTLS/none → 143) so the port in the dropdown label isn't just
|
|
||||||
// decoration. A non-standard custom port is left untouched.
|
|
||||||
const onSecurityChange = (val: string) => {
|
|
||||||
const secure = val === 'ssl';
|
|
||||||
setCfg((c) => {
|
|
||||||
const next = { ...c, imap_secure: secure };
|
|
||||||
if (!c.imap_port || c.imap_port === 993 || c.imap_port === 143) {
|
|
||||||
next.imap_port = secure ? 993 : 143;
|
|
||||||
}
|
|
||||||
return next;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const save = useMutation({
|
const save = useMutation({
|
||||||
mutationFn: () => {
|
mutationFn: () => {
|
||||||
// Mirror the SMTP card's client-side required guard. Host + port +
|
// Mirror the SMTP card's client-side required guard. Host + port +
|
||||||
@@ -105,9 +91,9 @@ export const IncomingMailConfigCard: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label className={labelCls}>{t('email.incoming.security', 'Security')}</label>
|
<label className={labelCls}>{t('email.incoming.security', 'Security')}</label>
|
||||||
<select className={selectCls} value={cfg.imap_secure ? 'ssl' : 'plain'} onChange={(e) => onSecurityChange(e.target.value)}>
|
<select className={selectCls} value={cfg.imap_secure ? 'ssl' : 'plain'} onChange={(e) => set('imap_secure', e.target.value === 'ssl')}>
|
||||||
<option value="ssl">{t('email.incoming.ssl', 'SSL/TLS (993)')}</option>
|
<option value="ssl">{t('email.incoming.ssl', 'SSL/TLS')}</option>
|
||||||
<option value="plain">{t('email.incoming.plain', 'None / STARTTLS (143)')}</option>
|
<option value="plain">{t('email.incoming.plain', 'None / STARTTLS')}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2481,8 +2481,8 @@
|
|||||||
"host": "IMAP-Host",
|
"host": "IMAP-Host",
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"security": "Sicherheit",
|
"security": "Sicherheit",
|
||||||
"ssl": "SSL/TLS (993)",
|
"ssl": "SSL/TLS",
|
||||||
"plain": "Keine / STARTTLS (143)",
|
"plain": "Keine / STARTTLS",
|
||||||
"user": "Benutzername",
|
"user": "Benutzername",
|
||||||
"pass": "Passwort",
|
"pass": "Passwort",
|
||||||
"folder": "Ordner",
|
"folder": "Ordner",
|
||||||
|
|||||||
@@ -2054,8 +2054,8 @@
|
|||||||
"host": "IMAP host",
|
"host": "IMAP host",
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"security": "Security",
|
"security": "Security",
|
||||||
"ssl": "SSL/TLS (993)",
|
"ssl": "SSL/TLS",
|
||||||
"plain": "None / STARTTLS (143)",
|
"plain": "None / STARTTLS",
|
||||||
"user": "Username",
|
"user": "Username",
|
||||||
"pass": "Password",
|
"pass": "Password",
|
||||||
"folder": "Folder",
|
"folder": "Folder",
|
||||||
|
|||||||
Reference in New Issue
Block a user