org.enableit.tools.email.interfaces
Interface Email

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface Email
extends javax.ejb.EJBObject

Remote interface for Email.

Author:
Tim Stephenson.

Method Summary
 void sendEmail(EmailConfigBean bean)
          Sends an email made up of a message and an attachment.
 void sendEmail(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String message)
          Sends an email message using the Mail server configured in the JNDI environment.
 void sendEmail(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String message, java.lang.String attachmentText)
          Sends an email message using the Mail server configured in the JNDI environment and creates an attachment too.
 void sendEmail(java.lang.String to, java.lang.String from, java.lang.String subject, java.lang.String message, java.net.URL attachmentUrl)
          Sends an email made up of a message and an attachment.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

sendEmail

public void sendEmail(java.lang.String to,
                      java.lang.String from,
                      java.lang.String subject,
                      java.lang.String message)
               throws java.rmi.RemoteException
Sends an email message using the Mail server configured in the JNDI environment.
Parameters:
to - Target email address.
from - Message 'from' address. If supplied this overrides the default in the JNDI context.
subject - Subject for the mail message.
message - Body text for the mail message.
Throws:
java.rmi.RemoteException - System exception, notably misconfiguration of mail server.

sendEmail

public void sendEmail(java.lang.String to,
                      java.lang.String from,
                      java.lang.String subject,
                      java.lang.String message,
                      java.lang.String attachmentText)
               throws java.rmi.RemoteException
Sends an email message using the Mail server configured in the JNDI environment and creates an attachment too.
Parameters:
to - Target email address.
from - Message 'from' address. If supplied this overrides the default in the JNDI context.
subject - Subject for the mail message.
message - Body text for the mail message.
attachmentText - Text to create as a text/plain attachment.
Throws:
java.rmi.RemoteException - System exception, notably misconfiguration of mail server.

sendEmail

public void sendEmail(java.lang.String to,
                      java.lang.String from,
                      java.lang.String subject,
                      java.lang.String message,
                      java.net.URL attachmentUrl)
               throws java.rmi.RemoteException
Sends an email made up of a message and an attachment. Converts a URL reference to an InputStream. The URL must be accessible using the http(s) protocol.
Parameters:
to - Target email address.
from - Message 'from' address. If supplied this overrides the default in the JNDI context.
subject - Subject for the mail message.
message - Body text for the mail message.
attachmentUrl - URL to fetch and create as an attachment.
Throws:
java.rmi.RemoteException - System exception, notably misconfiguration of mail server.

sendEmail

public void sendEmail(EmailConfigBean bean)
               throws java.rmi.RemoteException
Sends an email made up of a message and an attachment. Converts a URL reference to an InputStream. The URL must be accessible using the http(s) protocol.
Parameters:
bean - An EmailConfigBean containing all the details for the message.
Throws:
java.rmi.RemoteException - System exception, notably misconfiguration of mail server.


Copyright © 1999-2003 enableIT.org. All Rights Reserved.