Troubleshooting
Common issues and solutions for outlookctl.
⚙ Quick Diagnostics
Always start with the doctor command to check all prerequisites:
This checks all prerequisites and provides specific remediation advice.
pywin32 Not Installed
Solution
Folder Not Found
Solutions
Check folder name spelling
Use the standard folder names (case-insensitive):
For custom folders, use by-name or by-path
Message Not Found
Causes
- Message was deleted or moved
- Entry ID has expired (IDs can become stale)
- Wrong store ID provided
Solutions
Re-run list or search to get fresh IDs
Message IDs can expire. Run list or search again to get current IDs.
Ensure both IDs are from the same message
Both --id and --store must be from the same message result.
Send Confirmation Required
This is intentional
- You must provide explicit confirmation to send
Solution
Attachment Errors
When creating draft
Verify the file path exists, use absolute paths for reliability, and check file permissions.
When saving attachments
Ensure the message actually has attachments (has_attachments: true) and verify the destination directory is writable.
Unicode/Encoding Errors
Symptoms
- Garbled characters in output
- UnicodeDecodeError exceptions
Solutions
Ensure terminal supports UTF-8
Try PowerShell Core instead of cmd.exe
Set environment variable
Outlook Security Prompts
Solutions
Click Allow
One-time approval for the current operation
Trust Center settings (Outlook)
File > Options > Trust Center > Trust Center Settings > Programmatic Access - Set to "Never warn me"
Group Policy (enterprise)
Contact IT for policy configuration
Slow Performance
For large mailboxes
Use --count to limit results, add date filters (--since, --until), and search specific folders instead of all.
COM initialization
First command may be slow as COM initializes. Subsequent commands are faster.
Environment-Specific Issues
🖥 Windows Server / RDP
Ensure Outlook is running in the same session. COM may not work across sessions. Run both Outlook and outlookctl in the same RDP session.
💻 Virtual Machines
COM works in VMs with Outlook installed. Ensure adequate memory for Outlook.
🐧 WSL
COM automation requires Windows-native Python. Call outlookctl via PowerShell: powershell.exe -c "uv run python -m outlookctl.cli ..."
Getting Help
If issues persist, gather this information:
Run uv run python -m outlookctl.cli doctor and note all failures
Check Outlook is Classic (not New Outlook)
Try restarting Outlook
Verify pywin32: python -c "import win32com.client; print('OK')"
Version Information
Include version info when reporting issues: