send Email File Byte - Java Network

Java examples for Network:EMail

Description

send Email File Byte

Demo Code


import java.util.Properties;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.activation.FileDataSource;
import javax.mail.BodyPart;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import org.apache.log4j.Logger;

public class Main{
    private final static Logger logger = Logger
            .getLogger(EmailSmtpUtil.class.getName());
    public static void sendEmailFileByte(String to, String message,
            byte[] file, String subject) {

        logger.info("sendEmailFileByte");
        logger.info("NOT IMPLEMENTED");

    }//ww w . j a v a 2 s .c  om
}

Related Tutorials