mail page imap connection mime 5 bis rest 16 login page 14

This commit is contained in:
alma 2025-04-16 00:17:48 +02:00
parent 6eae29cf76
commit 3ce72c1b42
2 changed files with 14 additions and 1 deletions

View File

@ -68,7 +68,15 @@ function getStoredCredentials(): StoredCredentials | null {
} else {
// Client-side
const stored = localStorage.getItem('imapCredentials');
return stored ? JSON.parse(stored) : null;
if (!stored) return null;
const credentials = JSON.parse(stored);
return {
email: credentials.email,
password: credentials.password,
host: credentials.host,
port: credentials.port
};
}
}

View File

@ -23,6 +23,11 @@ export async function POST(request: Request) {
debug: (info: string) => console.log('IMAP Debug:', info)
};
console.log('Testing IMAP connection with config:', {
...imapConfig,
password: '***'
});
const imap = new Imap(imapConfig);
const connectPromise = new Promise((resolve, reject) => {