/*
* Created on May 11, 2003
*/
package net.sf.jportlet.service.mail;
import javax.mail.Address;
import javax.mail.MessagingException;
import javax.naming.NamingException;
import net.sf.jportlet.service.PortletService;
/**
* The <code>MailService</code> sends emails.
* This service expects the following properties:
* <ul>
* <li>session: JNDI of the <code>javax.mail.Session</code>
* </ul>
* @author <a href="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
*/
public interface MailService
extends PortletService
{
//~ Static fields/initializers ---------------------------------------------
public static final String NAME = MailService.class.getName( );
public static final String MIME_HTML = "text/html";
public static final String MIME_TEXT = "text/plain";
//~ Methods ----------------------------------------------------------------
/**
* Send an email
* @throws NamingException if the JNDINAme of the <code>javax.mail.Session</code> is invalid
* @throws MessagingException if any error while sending the email
*/
public void send( Address from,
Address to[],
String subject,
String body,
String mimeType )
throws NamingException,
MessagingException;
}
|