net.sf.jportlet.service.mail
Interface MailService
- All Superinterfaces:
- PortletService
- All Known Implementing Classes:
- MailServiceImpl
- public interface MailService
- extends PortletService
The MailService
sends emails.
This service expects the following properties:
- session: JNDI of the
javax.mail.Session
- Author:
- Herve Tchepannou
Field Summary |
static java.lang.String |
MIME_HTML
|
static java.lang.String |
MIME_TEXT
|
static java.lang.String |
NAME
|
Method Summary |
void |
send(javax.mail.Address from,
javax.mail.Address[] to,
java.lang.String subject,
java.lang.String body,
java.lang.String mimeType)
Send an email |
NAME
public static final java.lang.String NAME
MIME_HTML
public static final java.lang.String MIME_HTML
- See Also:
- Constant Field Values
MIME_TEXT
public static final java.lang.String MIME_TEXT
- See Also:
- Constant Field Values
send
public void send(javax.mail.Address from,
javax.mail.Address[] to,
java.lang.String subject,
java.lang.String body,
java.lang.String mimeType)
throws javax.naming.NamingException,
javax.mail.MessagingException
- Send an email
- Throws:
javax.naming.NamingException
- if the JNDINAme of the javax.mail.Session
is invalid
javax.mail.MessagingException
- if any error while sending the email
Copyright © 2002 Herve Tchepannou. All Rights Reserved.