H0llyW00dzZ
ab122177c2
- [+] feat(export): add message exporting functionality with JSON support - [+] feat(readme): update documentation to include message export feature - [+] refactor(.gitignore): change ignored files from emails.csv to test.csv and add test.json - [+] refactor(client): update message handling to use map structure instead of MessageDetails struct Reviewed-on: #4 Co-authored-by: H0llyW00dzZ <h0llyw00dzz@pm.me> Co-committed-by: H0llyW00dzZ <h0llyw00dzz@pm.me>
22 lines
533 B
Go
22 lines
533 B
Go
// Copyright (c) 2025 H0llyW00dzZ All rights reserved.
|
|
//
|
|
// By accessing or using this software, you agree to be bound by the terms
|
|
// of the License Agreement, which you can find at LICENSE files.
|
|
|
|
package client
|
|
|
|
import "fmt"
|
|
|
|
// GetClient retrieves the IMAPClient for a specific user
|
|
func (m *MultiUserIMAP) GetClient(username string) (*IMAPClient, error) {
|
|
m.mu.Lock()
|
|
defer m.mu.Unlock()
|
|
|
|
client, exists := m.clients[username]
|
|
if !exists {
|
|
return nil, fmt.Errorf("user not found: %s", username)
|
|
}
|
|
|
|
return client, nil
|
|
}
|