Welcome to blueglacier.tech!
This is the home tab of blueglacier.tech. Here you can find various projects, insights, and resources related to software development, technology, and more.
Navigate through the tabs above to explore different sections and tools.
Our Mission
To provide high-quality, open-source solutions and share knowledge to empower developers and tech enthusiasts alike.
Stay tuned for more updates and exciting projects!
Overview
The Email MIME Parser is a robust and efficient Java library designed for parsing complex email messages encoded in MIME (Multipurpose Internet Mail Extensions) format. It provides a straightforward API to extract various parts of an email, including text content, HTML content, attachments, and intricate header information.
Whether you're building an email client, an archival system, or an analytics tool, this library simplifies the often challenging task of decoding and understanding email structures.
Features
- Comprehensive MIME Parsing: Handles multi-part messages, including mixed, alternative, related, and digest types.
- Content Extraction: Easily retrieve plain text and HTML body parts.
- Attachment Handling: Identify and extract file attachments with their original filenames and content types.
- Header Parsing: Access all email headers (e.g., From, To, Subject, Date, Content-Type, Content-Transfer-Encoding) in a structured manner.
- Character Encoding Support: Decodes various character sets commonly found in email.
- Robust Error Handling: Designed to gracefully handle malformed or non-standard MIME messages.
- Pure Java: Written entirely in Java, ensuring cross-platform compatibility and ease of integration into Java projects.
Installation
You can add the Email MIME Parser to your Java project using Maven or Gradle.
Maven
Add the following dependency to your pom.xml
:
<dependency>
<groupId>tech.blueglacier</groupId>
<artifactId>email-mime-parser</artifactId>
<version>1.0.6</version>
</dependency>
Gradle
Add the following to your build.gradle
file:
implementation group: 'tech.blueglacier', name: 'email-mime-parser', version: '1.0.6'
Alternatively, you can download the JAR directly from the GitHub releases page and add it to your project's classpath.
Usage
Here's a quick example to get started with parsing an email message:
ContentHandler contentHandler = new CustomContentHandler();
MimeConfig mime4jParserConfig = MimeConfig.DEFAULT;
BodyDescriptorBuilder bodyDescriptorBuilder = new DefaultBodyDescriptorBuilder();
MimeStreamParser mime4jParser = new MimeStreamParser(mime4jParserConfig,DecodeMonitor.SILENT,bodyDescriptorBuilder);
mime4jParser.setContentDecoding(true);
mime4jParser.setContentHandler(contentHandler);
InputStream mailIn = 'Provide email mime stream here';
mime4jParser.parse(mailIn);
Email email = ((CustomContentHandler) contentHandler).getEmail();
List<Attachment> attachments = email.getAttachments();
Attachment calendar = email.getCalendarBody();
Attachment htmlBody = email.getHTMLEmailBody();
Attachment plainText = email.getPlainTextEmailBody();
String to = email.getToEmailHeaderValue();
String cc = email.getCCEmailHeaderValue();
String from = email.getFromEmailHeaderValue();
For more detailed examples and advanced usage, please refer to the GitHub repository.
Contributing
Contributions are welcome! If you have suggestions, bug reports, or want to contribute code, please write an email to ram.sharma.6453@gmail.com for guidelines.
You can also open an issue or pull request directly on GitHub.
About BlueGlacier.tech
BlueGlacier.tech is dedicated to creating innovative open-source solutions and sharing valuable technical knowledge. We believe in the power of community and collaboration to build better software.
Our focus areas include:
- Backend Development (Go, Java, Python)
- Cloud Technologies (Kubernetes, Docker)
- Software Architecture
Feel free to reach out or connect with us on GitHub!
- Developer : Ram Sharma Email : ram.sharma.6453@gmail.com
- Developer : Ashish Sharma Email : ashiish.sharma@gmail.com
- Intern Developer : Ishita Soni Email : ishitasoni0706@gmail.com
Internship Opportunities at BlueGlacier.tech
Internship Opportunity for BE/B.Tech Students
We are excited to offer a remote internship opportunity for BE/B.Tech students to contribute to our email mime-parser Java library. This is a great chance to work on real-world software, collaborate with experienced developers, and strengthen your skills in Java, Git, and software development best practices.
Students passionate about coding, open source, and eager to learn are encouraged to apply.
- Duration: 2 months (starting-June to end-July 2025)
- Location: Remote
- Eligibility: BE/B.Tech students (any year)
To apply or learn more, please contact: ram.sharma.6453@gmail.com
We look forward to your participation!
Best regards,
Ram Sharma
Ashish Sharma
BlueGlacier.tech