View RSS Feed

Java Mail

  1. Java Mail API Message

    by , 04-25-2012 at 09: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]www.xyz.net”[/url], “text/plain”);
    setText() method can also be used to set the content.
    Java Code:
    Message.setText(“[url]www.xyz.net”);[/url]
    ...
    Categories
    Mail API