Add IMAP settings to configuration and enhance email processing logic
This commit is contained in:
12
README.md
12
README.md
@@ -42,6 +42,16 @@ go build -o paraclub-ai-mailer ./cmd/paraclub-ai-mailer
|
||||
|
||||
The application uses a YAML configuration file (`config.yaml`) with the following structure:
|
||||
|
||||
### IMAP Settings
|
||||
- `server`: IMAP server hostname (e.g., "imap.gmail.com")
|
||||
- `port`: IMAP port (typically 993 for TLS)
|
||||
- `username`: Your email address
|
||||
- `password`: Email password (use ${IMAP_PASSWORD} to load from environment)
|
||||
- `mailbox_in`: Mailbox to check for new emails (e.g., "INBOX")
|
||||
- `draft_box`: Folder to save AI-generated drafts (e.g., "Drafts")
|
||||
- `processed_box`: Folder to move processed emails to (they will also be marked as read)
|
||||
- `use_tls`: Whether to use TLS for connection (recommended: true)
|
||||
|
||||
```yaml
|
||||
imap:
|
||||
server: "imap.example.com"
|
||||
@@ -111,7 +121,7 @@ Or specify a custom config file path:
|
||||
- Retrieves HTML content from configured URLs
|
||||
- Sends combined content to OpenRouter AI for response generation
|
||||
- Saves the AI-generated response as a draft email
|
||||
- Marks the original email as processed
|
||||
- Marks the original email as read and moves it to the configured processed folder
|
||||
|
||||
## Logging
|
||||
|
||||
|
||||
Reference in New Issue
Block a user