EML files are a very common e-mail file format. They are often attached to other e-mail messages while forwarding. An .eml file in its simplest form is an individual e-mail message file. Because .eml files are formatted text files, the header source of a .eml email file can be seen byusing an ASCII text file editor like Notepad. While it is possible to view the unformatted content of a .eml file in text editor, it won't look pretty. To see a .eml file in it's formatted glory, use a .eml file viewer. Encryptomatic LLC offers a free online .eml file viewer. Upload any .eml file and view it in your web browser.
.EML files contain email messages and email file attachments and email meta data (information about the email). File attachments are encoded as text and will not be discernable when viewing the source file in a standard text viewer.
The .eml file extension, also known as RFC-822 file format, was created in 1982 as an improvement to RFC-733 by establishing ARPA standards for the rapidly growing use of e-mail and by simplifying the address standards that were not being uniformly accepted by the software industry. However, in a purist sense, there is not a direct one-to-one relationship when talking about RFC-822 and .eml files.
Microsoft created a series of COM modules, which were included in its development of Outlook Express, a popular early email client. These modules were then included in Microsoft's Office suite of products. Though the RFC standard is open, Microsoft deviated from the open standard and created the .pst file format where the information of the e-mails is stored in a highly structured database format. This was a proprietary approach to the RFC-822 standard, since without the presence of the modules, trying to read the contents of the e-mails or their attachments was difficult, if not impossible.
The primary purpose of creating a .eml file is for storing the files offline and to allow forwarding of e-mail messages and their content. This resulted in a problem for users of other (non-Microsoft) email clients when receiving emails forwarded from Outlook users. The non-standard fowarded Outlook emails often arrived as an undiscernable winmail.dat files.
In 2001, the 822 standard was enhanced by consolidating various improvements to the 822 specifications, creating the 2822 – Internet Message Format currently in use.
Since then, other programs create e-mails with the .eml extension which saves the file in the MIME RFC-822 format. EML files have a standard file structure and are often use simple ASCII text to write the header and main message body. The header includes the e-mail address of the sender, the e-mail address of the receiver, the subject line text, and the time and date the message was sent.
The main message is in the body of the .eml file where hyperlinks and attachments can also be embedded.
An .eml file can be created by open e-mail clients such as Windows Mail and Thunderbird. As noted above, the RFC-822 standard is an open and industry wide standard and a basic text editor can be used. Most email clients that adhear to this standard will automatically create a .eml file when you open an email message and choose "save as" from the file menu. Often dragging and dropping an email message from the list to your desktop will result in the email client automatically generating a .eml file.
If you are a software programer, the following code can be used to create an .eml file: (courtesy of Stack Overflow, //stackoverflow.com/questions/157195/create-a-eml-email-file-in-java).
public static void createMessage(String to, String from, String subject, String body, List attachments) {
try {
Message message = new MimeMessage(Session.getInstance(System.getProperties()));
message.setFrom(new InternetAddress(from));
message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to));
message.setSubject(subject);
// create the message part
MimeBodyPart content = new MimeBodyPart();
// fill message
content.setText(body);
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(content);
// add attachments
for(File file : attachments) {
MimeBodyPart attachment = new MimeBodyPart();
DataSource source = new FileDataSource(file);
attachment.setDataHandler(new DataHandler(source));
attachment.setFileName(file.getName());
multipart.addBodyPart(attachment);
}
// integration
message.setContent(multipart);
// store file
message.writeTo(new FileOutputStream(new File("c:/mail.eml")));
} catch (MessagingException ex) {
Logger.getLogger(Mailkit.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(Mailkit.class.getName()).log(Level.SEVERE, null, ex);
}
}
Currently, there are many programs that can be used to open and view .eml files. The requirement is that the e-mail client is RFC-822 compliant or you have an application on your computer that has a preset default for opening files with a .eml extension. MailDex® is a specialized email viewing application that will render .eml files, as well as other email formats including Microsoft's .pst, .ost and .msg files.
You can use this free online .eml file viewer to upload a single .eml file, view it in your web browser and also download any file attachments.
Email clients, such as Mozilla Thunderbird and MS Outlook can also open individual .eml files.
A text version of the RFC-822 document.
An HTML hyperlinked version of the RFC-822 standard from Carnegie Mellon University.
The updated RFC-822/2822 standard.
Address format of RFC-822.
An IBM link noting some differences between RFC-821 and 822.
A problem with .eml and Lotus notes with some notes on the .eml format.
Resolving .eml extension problem by modifying the registry.
PHP code for a normal e-mail file.
Using Java to create and save an .eml file.
View End User License Agreement.
Software may be uninstalled with Windows Add/Remove Programs service.
© 2005, Encryptomatic LLC. Fargo, ND, USA.