Example usage for javax.mail.internet InternetAddress InternetAddress

List of usage examples for javax.mail.internet InternetAddress InternetAddress

Introduction

In this page you can find the example usage for javax.mail.internet InternetAddress InternetAddress.

Prototype

public InternetAddress(String address, String personal, String charset) throws UnsupportedEncodingException 

Source Link

Document

Construct an InternetAddress given the address and personal name.

Usage

From source file:at.molindo.notify.channel.mail.AbstractMailClient.java

public AbstractMailClient setReplyTo(String address, String personal) throws AddressException {
    try {/*www  .j  a va2  s .  co m*/
        return setReplyTo(new InternetAddress(address, personal, CharsetUtils.UTF_8.displayName()));
    } catch (UnsupportedEncodingException e) {
        throw new RuntimeException("utf8 not supported?", e);
    }
}