/Users/richardallenbair/Documents/Source/Projects/nonsense/swingx/src/beaninfo/EmailErrorReporter_API.java
/*
 * $Id: EmailErrorReporter_API.html 1362 2006-08-24 20:06:25Z rbair $
 *
 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
 * Santa Clara, California 95054, U.S.A. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

package org.jdesktop.swingx.error;

import com.sun.mail.smtp.SMTPMessage;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Date;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.mail.Message;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMultipart;
import org.jdesktop.swingx.*;
import org.jdesktop.swingx.util.SwingWorker;


/**
 * <p>An {@link ErrorReporter} that reports application errors using SMTP.</p>
 *
 * <em>This class requires the optional mail.jar and activation.jar libraries</em>
 *
 * @author Alexander Zuev
 * @author rbair
 * @version 1.1
 */
public class EmailErrorReporter extends JavaBean implements ErrorReporter {
    /**
     * Creates a new <code>EmailErrorReporter</code>.
     */
    public EmailErrorReporter();
    
    public void setToAddresses(String... addresses);
    public String[] getToAddresses();
    
    public void setCcAddresses(String... addresses);
    public String[] getCcAddresses();

    public void setBccAddresses(String... addresses);
    public String[] getBccAddresses();
    
    public void setAttachments(Object... attachments);
    public Object[] getAttachments();
    
    public void setSubject(String subject);
    public String getSubject();
    
    public void setBody(String body);
    public String getBody();
    
    /**
     * @inheritDoc
     */
    public void reportError(ErrorInfo info);

    /**
     * Compose and send message
     * @param info
     */
    protected void sendMessage(ErrorInfo info);
}