A Python application for converting Microsoft Outlook Template (.oft) files to standard EML format with embedded image support.
- Format Support: Converts .oft (Outlook Template) files to .eml (standard email format)
- Embedded Images: Properly handles inline images with Content-ID references
- Batch Processing: Convert multiple files at once
- GUI Interface: Easy-to-use graphical interface
- Command Line: Also available as a command-line tool
- Cross-Platform: Works on Windows, macOS, and Linux
- Python 3.8 or higher (3.8-3.12 officially supported)
- tkinter (usually included with Python)
-
Clone the repository:
git clone https://github.com/trsdn/oft-eml-converter.git cd oft-eml-converter -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
Launch the graphical interface:
./run_gui.shOr directly:
python oft_to_eml_gui.pyFeatures:
- Click to browse and select OFT files
- Choose output directory (remembers last location)
- Real-time conversion progress
- Batch processing support
- Error handling and results display
Convert a single file:
python oft_to_eml_converter.py input.oft [output.eml]Examples:
# Convert with automatic output naming
python oft_to_eml_converter.py template.oft
# Convert with specific output name
python oft_to_eml_converter.py template.oft converted.emlThe converter:
- Parses OFT files using the
extract-msglibrary - Extracts email components: headers, plain text, HTML body, and attachments
- Handles embedded images: Converts attachments with Content-IDs to inline images
- Creates EML files: Uses Python's
emaillibrary to generate RFC-compliant MIME messages - Preserves formatting: Maintains original styling and embedded content
- Headers: From, To, CC, Subject, Date
- Body: Plain text and HTML content
- Attachments: Regular file attachments
- Embedded Images: Inline images with proper Content-ID mapping
oft-eml-converter/
├── oft_to_eml_converter.py # Core conversion logic
├── oft_to_eml_gui.py # GUI application
├── run_gui.sh # GUI launcher script
├── requirements.txt # Python dependencies
└── README.md # This file
extract-msg: For parsing OFT/MSG filestkinter: For GUI interface (usually included)
- Python 3.8+ (officially tested on 3.8-3.12)
- 50MB free disk space
- Internet connection for initial setup
- Supported OS: Windows 10+, macOS 10.15+, Ubuntu 20.04+
"No module named '_tkinter'"
- Install tkinter:
brew install python-tk(macOS) orsudo apt-get install python3-tk(Ubuntu)
"Unable to load tkdnd library"
- This is expected - the application gracefully falls back to browse-only mode
Conversion errors
- Ensure the .oft file isn't corrupted
- Check that you have read permissions for the input file
- Verify the output directory is writable
- Check that all dependencies are installed:
pip list - Verify your Python version:
python --version(should be 3.8+) - Run with verbose output for debugging
- Check our CI/CD status to ensure the latest build is working
- Review existing issues for similar problems
- Open a new issue if your problem persists
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Clone your fork:
git clone https://github.com/yourusername/oft-eml-converter.git - Create a feature branch:
git checkout -b feature-name - Set up development environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
- Make your changes
- Run tests:
pytest tests/ -vorpython -m tests.test_converter - Ensure CI passes locally
- Submit a pull request with a clear description
- Follow PEP 8 guidelines
- Use meaningful variable names
- Add docstrings for functions and classes
- Include tests for new functionality
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Python's standard email and tkinter libraries
- Uses the excellent
extract-msglibrary for OFT file parsing - Inspired by the need for reliable OFT to EML conversion
- Enhanced CI/CD with comprehensive cross-platform testing
- Advanced CLI converter error handling validation
- Virtual environment creation and management testing
- Headless-safe GUI import testing for CI environments
- Cross-platform file operations validation
- Package requirement verification system
- Professional release management with GitHub Actions
- Initial release
- GUI and command-line interfaces
- Embedded image support
- Batch processing
- Cross-platform compatibility