Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.UnsupportedEncodingException;

import javax.mail.MessagingException;

import javax.mail.internet.MimeMessage;

import javax.mail.internet.MimeUtility;

public class Main {
    private static String getSubject(MimeMessage msg) throws MessagingException, UnsupportedEncodingException {
        return MimeUtility.decodeText(msg.getSubject());
    }
}