View RSS Feed

Java Mail

  1. Java Mail API Message

    by , 04-25-2012 at 10:51 PM
    When session object has been created, message is created so that to send it by the help of Message class. As message class is considered as abstract class hence subclass javax.mail.internet.MimeMessage will be used.
    Java Code:
    MimeMessage message = new MimeMessage(session) 
    // set the content of message by setContent() method
    message.setContent(“[url]”[/url], “text/plain”);
    setText() method can also be used to set the content.
    Java Code:
    Mail API