com.bankframe.services.mail
Class SendMailBean

java.lang.Object
  extended bycom.bankframe.ejb.ESessionBean
      extended bycom.bankframe.services.mail.SendMailBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, ESession, java.io.Serializable, javax.ejb.SessionBean

public class SendMailBean
extends ESessionBean

The Mail service allows a BankFrame MCA based system to send e-mail messages to a specified user over the Internet or an Intranet.

It uses Sun's javax.mail API to create and send e-mail messages.

Note, that the MCA Mail Service only sends e-mail.

Author:
ETU
See Also:
Serialized Form

Constructor Summary
SendMailBean()
           
 
Method Summary
 void ejbCreate()
          The ejbCreate method
 void ejbPostCreate()
          The ejbPostCreate method.
 java.util.Vector processDataPacket(DataPacket data)
          The processDataPacket method is responsible for handling a DataPacket that contains a request to send an email.
 void sendMail(java.lang.String mailFrom, java.lang.String[] addresses, java.lang.String[] ccAddresses, java.lang.String subject, java.lang.StringBuffer message, java.lang.String content, java.lang.String connTimeout, java.lang.String debug)
          This method sends the email.
 void sendMail(java.lang.String mailFrom, java.lang.String[] addresses, java.lang.String[] ccAddresses, java.lang.String subject, java.lang.String text, java.lang.String content, java.lang.String connTimeout, java.lang.String debug)
          This method sends the email.
 void sendMail(java.lang.String mailFrom, java.lang.String[] addresses, java.lang.String subject, java.lang.String text)
          Sends the email.
 void sendMail(java.lang.String mailFrom, java.lang.String[] addresses, java.lang.String subject, java.lang.StringBuffer message)
          This method sends the email.
 
Methods inherited from class com.bankframe.ejb.ESessionBean
audit, ejbActivate, ejbLoad, ejbPassivate, ejbRemove, ejbStore, getSessionContext, processDataPackets, setSessionContext, unsetSessionContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SendMailBean

public SendMailBean()
Method Detail

ejbCreate

public void ejbCreate()
The ejbCreate method

Overrides:
ejbCreate in class ESessionBean

ejbPostCreate

public void ejbPostCreate()
The ejbPostCreate method.

Overrides:
ejbPostCreate in class ESessionBean

processDataPacket

public java.util.Vector processDataPacket(DataPacket data)
                                   throws ProcessingErrorException,
                                          java.rmi.RemoteException
The processDataPacket method is responsible for handling a DataPacket that contains a request to send an email.

Specified by:
processDataPacket in interface ESession
Specified by:
processDataPacket in class ESessionBean
Parameters:
data - The DataPacket to process.
Returns:
Vector Contains the responses.
Throws:
ProcessingErrorException - The exception thrown if there is an error in processing the mail request.
java.rmi.RemoteException

sendMail

public void sendMail(java.lang.String mailFrom,
                     java.lang.String[] addresses,
                     java.lang.String[] ccAddresses,
                     java.lang.String subject,
                     java.lang.String text,
                     java.lang.String content,
                     java.lang.String connTimeout,
                     java.lang.String debug)
              throws javax.mail.MessagingException
This method sends the email.

Parameters:
mailFrom - is the address of the sender
addresses - is an array of addresses to send the mail to
ccAddresses - is an array of CC-addresses to CC the mail to
subject - is the subject title
text - is the mail message
content - is the content type of the message, defaults to "text/plain" if null
connTimeout - is the timeout value for sending the message, default to 15000 if null
debug - indicates if the mail API is set in debug mode, this can be null
Throws:
javax.mail.MessagingException - if an error occurs sending the mail

sendMail

public void sendMail(java.lang.String mailFrom,
                     java.lang.String[] addresses,
                     java.lang.String subject,
                     java.lang.String text)
              throws javax.mail.MessagingException
Sends the email.

Parameters:
mailFrom - is the address of the sender
addresses - is an array of addresses to send the mail to
subject - is the subject title
text - is the mail message
Throws:
javax.mail.MessagingException - if an error occurs sending the mail

sendMail

public void sendMail(java.lang.String mailFrom,
                     java.lang.String[] addresses,
                     java.lang.String subject,
                     java.lang.StringBuffer message)
              throws javax.mail.MessagingException
This method sends the email.

Parameters:
addresses - is an array of addresses to send the mail to
subject - is the subject title
message - is the mail message
Throws:
javax.mail.MessagingException - if an error occurs sending the mail

sendMail

public void sendMail(java.lang.String mailFrom,
                     java.lang.String[] addresses,
                     java.lang.String[] ccAddresses,
                     java.lang.String subject,
                     java.lang.StringBuffer message,
                     java.lang.String content,
                     java.lang.String connTimeout,
                     java.lang.String debug)
              throws javax.mail.MessagingException
This method sends the email.

Parameters:
addresses - is an array of addresses to send the mail to
ccAddresses - is an array of CC-addresses to CC the mail to
subject - is the subject title
message - is the mail message
content - is the content type of the message, defaults to "text/plain" if null
connTimeout - is the timeout value for sending the message, default to infinite if null
debug - indicates if the mail API is set in debug mode, this can be null
Throws:
javax.mail.MessagingException - if an error occurs sending the mail


Copyright © 2004 Siebel Systems, Inc. All rights reserved.