org.ikasan.console.service
Class ConsoleEmailNotifier

java.lang.Object
  extended by org.ikasan.console.service.ConsoleEmailNotifier

public class ConsoleEmailNotifier
extends Object

Console Email Notifier implementation

Author:
Ikasan Development Team

Constructor Summary
ConsoleEmailNotifier(org.springframework.mail.javamail.JavaMailSender mailSender, String to, String from, String environment)
          Constructor non optional parameters TODO: Enforce mandatory fields here
 
Method Summary
 void sendMail()
          Send the mail
 void setBody(String body)
          Setter for mail body text.
 void setFrom(String from)
          Setter for mail
 void setMultipart(boolean multipart)
          Support for multipart message (i.e.: attachments) TODO: probably this setter is not needed.
 void setSubject(String subject)
          Setter for subject
 void setTo(String to)
          Setter for to address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleEmailNotifier

public ConsoleEmailNotifier(org.springframework.mail.javamail.JavaMailSender mailSender,
                            String to,
                            String from,
                            String environment)
Constructor non optional parameters TODO: Enforce mandatory fields here

Parameters:
mailSender - Mail sender
to - email recipient
from - email sender
environment - The runtime environment
Method Detail

setTo

public void setTo(String to)
Setter for to address.

Parameters:
to - email message to address

setSubject

public void setSubject(String subject)
Setter for subject

Parameters:
subject - email message subject

setBody

public void setBody(String body)
Setter for mail body text.

Parameters:
body - email message text content

setFrom

public void setFrom(String from)
Setter for mail

Parameters:
from - sender email address

setMultipart

public void setMultipart(boolean multipart)
Support for multipart message (i.e.: attachments) TODO: probably this setter is not needed. We will not be sending attachments with email notifications!

Parameters:
multipart - boolean flag

sendMail

public void sendMail()
              throws Exception
Send the mail

Throws:
Exception


Copyright © 2007-2014 Ikasan. All Rights Reserved.