net.sf.logdistiller.publishers
Class MailPublisher

java.lang.Object
  extended by net.sf.logdistiller.Publisher
      extended by net.sf.logdistiller.publishers.MailPublisher

public class MailPublisher
extends Publisher

Send mail report of a LogDistillation. When the report is a group report, a file containing logevents (if saved) is added as attachment. Global output parameters are used as JavaMail session properties: the most important property is mail.smtp.host, but see JavaMail documentation to find all available properties.

Parameters:


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.logdistiller.Publisher
Publisher.PublishException
 
Constructor Summary
MailPublisher()
           
 
Method Summary
 String getId()
          Get the publisher-id for this class.
 void publish(LogDistillation.Group group, LogDistiller.Report report)
          Publish a group report.
 void publish(LogDistillation logdistillation, LogDistiller.Report report)
          Publish a global report.
protected  void sendMail(LogDistillation logdistillation, LogDistiller.Report report, String subject, String content, String mimetype, File attach)
           
protected  void sendMail(javax.mail.Message msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailPublisher

public MailPublisher()
Method Detail

getId

public String getId()
Description copied from class: Publisher
Get the publisher-id for this class.

Specified by:
getId in class Publisher
Returns:
a unique publisher id

publish

public void publish(LogDistillation logdistillation,
                    LogDistiller.Report report)
             throws IOException,
                    Publisher.PublishException
Description copied from class: Publisher
Publish a global report.

Specified by:
publish in class Publisher
Parameters:
logdistillation - the logdistillation containing the results to publish
report - the report configuration
Throws:
IOException
Publisher.PublishException

publish

public void publish(LogDistillation.Group group,
                    LogDistiller.Report report)
             throws IOException,
                    Publisher.PublishException
Description copied from class: Publisher
Publish a group report.

Specified by:
publish in class Publisher
Parameters:
group - the logdstillation group containing the results to publish
report - the report configuration
Throws:
IOException
Publisher.PublishException

sendMail

protected void sendMail(LogDistillation logdistillation,
                        LogDistiller.Report report,
                        String subject,
                        String content,
                        String mimetype,
                        File attach)
                 throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

sendMail

protected void sendMail(javax.mail.Message msg)
                 throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException


Copyright © 2004-2009. All Rights Reserved.