Java Email Send sendMimeMessage(MimeMessage mimeMessage)

Here you can find the source of sendMimeMessage(MimeMessage mimeMessage)

Description

Send the message using the JavaMail session defined in the message

License

Open Source License

Parameter

Parameter Description
mimeMessage Message to send

Declaration

public static void sendMimeMessage(MimeMessage mimeMessage) 

Method Source Code

//package com.java2s;
/*/*  ww w .j a v  a 2  s.  co m*/
 * Copyright (c) 2014 Wael Chatila / Icegreen Technologies. All Rights Reserved.
 * This software is released under the Apache license 2.0
 */

import javax.mail.*;
import javax.mail.internet.*;

public class Main {
    /**
     * Send the message using the JavaMail session defined in the message
     *
     * @param mimeMessage Message to send
     */
    public static void sendMimeMessage(MimeMessage mimeMessage) {
        try {
            Transport.send(mimeMessage);
        } catch (MessagingException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. sendMail(String to, String from, String subject, String body, boolean bodyIsHTML)
  2. sendMail(String toEmailId, String subject, String msgText, String from, String smtpServer, String userName, String password)
  3. sendMail(String vmName, String property, String emailId, boolean usageHigh)
  4. sendMessage(Message message)
  5. sendMessage(Message msg, Transport transport)
  6. sendResetPasswordMail(String to, String message)
  7. sendResetPasswordMail(String to, String newPassword, final String mailUser, final String mailPassword, String mailHost, String mailPort)