Here you can find the source of sendMimeMessage(MimeMessage mimeMessage)
Parameter | Description |
---|---|
mimeMessage | Message to send |
public static void sendMimeMessage(MimeMessage mimeMessage)
//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); } } }