Package org.jvnet.mock_javamail
Class MockTransport
- java.lang.Object
-
- jakarta.mail.Service
-
- jakarta.mail.Transport
-
- org.jvnet.mock_javamail.MockTransport
-
- All Implemented Interfaces:
AutoCloseable
public class MockTransport extends jakarta.mail.Transport
MockTransport
to deliver toMailbox
.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description MockTransport(jakarta.mail.Session session, jakarta.mail.URLName urlname)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(String host, int port, String user, String password)
void
sendMessage(jakarta.mail.Message msg, jakarta.mail.Address[] addresses)
-
Methods inherited from class jakarta.mail.Transport
addTransportListener, notifyTransportListeners, removeTransportListener, send, send, send, send
-
-
-
-
Method Detail
-
connect
public void connect(String host, int port, String user, String password) throws jakarta.mail.MessagingException
- Overrides:
connect
in classjakarta.mail.Service
- Throws:
jakarta.mail.MessagingException
-
sendMessage
public void sendMessage(jakarta.mail.Message msg, jakarta.mail.Address[] addresses) throws jakarta.mail.MessagingException
- Specified by:
sendMessage
in classjakarta.mail.Transport
- Throws:
jakarta.mail.MessagingException
-
-