org.jboss.seam.mock
public class MockTransport extends javax.mail.Transport
getMailMessage() returns the most recently rendered
message sent using the MockTransport.
To enable the mock transport, set the mailSession.transport property to mock
in components.properties.Transport| Constructor and Description |
|---|
MockTransport(javax.mail.Session session,
javax.mail.URLName urlname) |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearMailMessage()
Get the most recently rendered message sent using the MockTransport.
|
void |
connect() |
static javax.mail.internet.MimeMessage |
getMailMessage()
Get the most recently rendered message sent using the MockTransport.
|
void |
sendMessage(javax.mail.Message message,
javax.mail.Address[] recipients) |
addTransportListener, notifyTransportListeners, removeTransportListener, send, sendpublic MockTransport(javax.mail.Session session,
javax.mail.URLName urlname)
public void sendMessage(javax.mail.Message message,
javax.mail.Address[] recipients)
throws javax.mail.MessagingException
sendMessage in class javax.mail.Transportjavax.mail.MessagingExceptionpublic static void clearMailMessage()
public static javax.mail.internet.MimeMessage getMailMessage()
public void connect()
throws javax.mail.MessagingException
connect in class javax.mail.Servicejavax.mail.MessagingExceptionCopyright © 2015 Seam Framework. All Rights Reserved.