net.sf.xbus.technical.mail
Class SMTPSender

java.lang.Object
  extended by net.sf.xbus.technical.mail.SMTPSender
All Implemented Interfaces:
Sender, TextSender

public class SMTPSender
extends java.lang.Object
implements Sender, TextSender

The SMTPSender sends messages to mail accounts via the SMTP protocol.

This sender is very simple. It does not support the transaction mechanism. Instead of it, the message will directly be sent when calling the execute method.

Configuration:

Chapter Section Key Content
System logical name of the sender Host Hostname of the SMTP server
System logical name of the sender Subject Subject line for the mail message
System logical name of the sender ToAddress i List of mail addresses where the message will be sent to
System logical name of the sender FromAddress Mail Address of the mail sender
System logical name of the sender FromName Optional: Name of the mail sender
System logical name of the sender User Optional: User needed for authentication
System logical name of the sender Password Optional: Password needed for authentication


Constructor Summary
SMTPSender(XBUSSystem destination)
          The constructor stores the given destination.
 
Method Summary
 java.lang.String execute(java.lang.String function, java.lang.String callData)
          Sends the callData.
 java.lang.String getType()
          A Sender can send data either as a String or as an Object to the neighboring system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMTPSender

public SMTPSender(XBUSSystem destination)
The constructor stores the given destination.

Method Detail

execute

public java.lang.String execute(java.lang.String function,
                                java.lang.String callData)
                         throws XException
Sends the callData. function is ignored.

Specified by:
execute in interface TextSender
Parameters:
function - used by some senders
callData - the data that shall be send to the neighbor system
Returns:
null
Throws:
XException - if something goes wrong

getType

public java.lang.String getType()
Description copied from interface: Sender
A Sender can send data either as a String or as an Object to the neighboring system.
When working with Strings the Sender must fulfill two preconditions: When working with Objects the Sender must also fulfill two preconditions:

Specified by:
getType in interface Sender