Google Workspace
  • Google Workspace
Home Gmail All products
  • Google Workspace apps
  • Admin console
  • Cloud Search
  • Gmail
  • Google Calendar
  • Google Chat
  • Google Classroom
  • Google Docs
  • Google Drive
  •  
  • Google Forms
  • Google Keep
  • Google Meet
  • Google Sheets
  • Google Sites
  • Google Slides
  • Google Tasks
  • Google Vault
  • Extend, automate & share
  • Add-ons
  • Apps Script
  • Chat apps
  • Drive apps
  • Marketplace
Resources
  • Tools
  • Admin console
  • Apps Script dashboard
  • Google Cloud console
  • APIs Explorer
  • Training & support
  • How to get started
  • Codelabs
  • Developer support
  • Updates
  • Blog
  • Developer Previews
  • Newsletter
  • Twitter
  • YouTube
  • English
  • Bahasa Indonesia
  • Deutsch
  • Español
  • Español – América Latina
  • Français
  • Italiano
  • Polski
  • Português – Brasil
  • Tiếng Việt
  • Türkçe
  • Русский
  • עברית
  • العربيّة
  • فارسی
  • हिंदी
  • বাংলা
  • ภาษาไทย
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어
  • Gmail
Overview Guides Reference Samples Support
Google Workspace
  • Google Workspace
  • Home
  • Gmail
    • Overview
    • Guides
    • Reference
    • Samples
    • Support
  • All products
    • More
  • Resources
    • More
  • Overview
  • Developer video library
  • GitHub samples
    • Mail importer for Gmail (Java)
  • Google Workspace apps
  • Admin console
  • Cloud Search
  • Gmail
  • Google Calendar
  • Google Chat
  • Google Classroom
  • Google Docs
  • Google Drive
  •  
  • Google Forms
  • Google Keep
  • Google Meet
  • Google Sheets
  • Google Sites
  • Google Slides
  • Google Tasks
  • Google Vault
  • Extend, automate & share
  • Add-ons
  • Apps Script
  • Chat apps
  • Drive apps
  • Marketplace
  • Tools
  • Admin console
  • Apps Script dashboard
  • Google Cloud console
  • APIs Explorer
  • Training & support
  • How to get started
  • Codelabs
  • Developer support
  • Updates
  • Blog
  • Developer Previews
  • Newsletter
  • Twitter
  • YouTube
  • Home
  • Google Workspace
  • Gmail
  • Samples

Samples

Mail Importer for Gmail

Mail Importer for Gmail is an open source project from Google that uploads the contents of a Thunderbird mail archive to Gmail, doing its best to preserve the read state, flagged state, and folders of the messages. It is written in Java and uses Messages.import endpoint.

Clone the GitHub repository to get the full source code, or simply browse the Gmail-related code.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-12-19 UTC.

  • Blog Blog
    Read the Google Workspace Developers blog
  • Twitter Twitter
    Follow @workspacedevs on Twitter
  • Code Samples Code Samples
    Explore our sample apps or copy them to build your own
  • Codelabs Codelabs
    Try a guided, hands-on coding experience
  • Videos Videos
    Subscribe to our YouTube channel
  • Google Workspace for Developers

    • Platform overview
    • Developer products
    • Developer support
    • Terms of Service
  • Tools

    • Admin console
    • Apps Script Dashboard
    • Google Cloud console
    • APIs Explorer
  • Connect

    • Blog
    • Newsletter
    • Twitter
    • YouTube
Google Developers
  • Android
  • Chrome
  • Firebase
  • Google Cloud Platform
  • All products
  • Terms
  • Privacy
  • ICP证合字B2-20070004号
  • Sign up for the Google Developers newsletter Subscribe
  • English
  • Bahasa Indonesia
  • Deutsch
  • Español
  • Español – América Latina
  • Français
  • Italiano
  • Polski
  • Português – Brasil
  • Tiếng Việt
  • Türkçe
  • Русский
  • עברית
  • العربيّة
  • فارسی
  • हिंदी
  • বাংলা
  • ภาษาไทย
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어