@@ -0,0 +1,2921 @@
+/*%0A * JGrapes Event Driven Framework%0A * Copyright (C) 2022 Michael N. Lipp%0A * %0A * This program is free software; you can redistribute it and/or modify it %0A * under the terms of the GNU General Public License as published by %0A * the Free Software Foundation; either version 3 of the License, or %0A * (at your option) any later version.%0A * %0A * This program is distributed in the hope that it will be useful, but %0A * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY%0A * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License %0A * for more details.%0A * %0A * You should have received a copy of the GNU General Public License along %0A * with this program; if not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0Apackage org.jgrapes.mail;%0A%0Aimport jakarta.mail.internet.AddressException;%0Aimport jakarta.mail.internet.InternetAddress;%0Aimport java.io.UnsupportedEncodingException;%0Aimport java.security.Principal;%0A%0A/**%0A * A variant of %7B@link InternetAddress%7D that can be used as a %0A * %7B@link Principal%7D.%0A */%0Apublic class InternetAddressPrincipal extends InternetAddress%0A        implements Principal %7B%0A%0A    private static final long serialVersionUID = -6900967855203936680L;%0A%0A    /**%0A     * See %7B@link InternetAddress#InternetAddress()%7D.%0A     */%0A    public InternetAddressPrincipal() %7B%0A        super();%0A    %7D%0A%0A    /**%0A     * See %7B@link InternetAddress#InternetAddress(String, boolean))%7D.%0A     *%0A     * @param address the address%0A     * @param strict the strict%0A     * @throws AddressException the address exception%0A     */%0A    public InternetAddressPrincipal(String address, boolean strict)%0A            throws AddressException %7B%0A        super(address, strict);%0A    %7D%0A%0A    /**%0A     * See %7B@link InternetAddress#InternetAddress(String, String, String)))%7D.%0A     *%0A     * @param address the address%0A     * @param personal the personal%0A     * @param charset the charset%0A     * @throws UnsupportedEncodingException the unsupported encoding exception%0A     */%0A    public InternetAddressPrincipal(String address, String personal,%0A            String charset) throws UnsupportedEncodingException %7B%0A        super(address, personal, charset);%0A    %7D%0A%0A    /**%0A     * See %7B@link InternetAddress#InternetAddress(String, String)))%7D.%0A     *%0A     * @param address the address%0A     * @param personal the personal%0A     * @throws UnsupportedEncodingException the unsupported encoding exception%0A     */%0A    public InternetAddressPrincipal(String address, String personal)%0A            throws UnsupportedEncodingException %7B%0A        super(address, personal);%0A    %7D%0A%0A    /**%0A     * See %7B@link InternetAddress#InternetAddress(String)))%7D.%0A     *%0A     * @param address the address%0A     * @throws AddressException the address exception%0A     */%0A    public InternetAddressPrincipal(String address) throws AddressException %7B%0A        super(address);%0A    %7D%0A%0A    @Override%0A    public String getName() %7B%0A        return getAddress();%0A    %7D%0A%0A%7D%0A

Add utility class.