Package io.jmix.email.impl
Class EmailConnectionTesterImpl
java.lang.Object
io.jmix.email.impl.EmailConnectionTesterImpl
- All Implemented Interfaces:
EmailConnectionTester
@NullMarked
@Component("email_EmailConnectionTester")
public class EmailConnectionTesterImpl
extends Object
implements EmailConnectionTester
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.springframework.mail.javamail.JavaMailSender -
Constructor Summary
ConstructorsConstructorDescriptionEmailConnectionTesterImpl(org.springframework.mail.javamail.JavaMailSender mailSender) -
Method Summary
Modifier and TypeMethodDescriptionvoidConnects the underlying mail transport, performs authentication and closes the connection.
-
Field Details
-
mailSender
protected final org.springframework.mail.javamail.JavaMailSender mailSender
-
-
Constructor Details
-
EmailConnectionTesterImpl
public EmailConnectionTesterImpl(org.springframework.mail.javamail.JavaMailSender mailSender)
-
-
Method Details
-
testConnection
public void testConnection() throws jakarta.mail.MessagingExceptionDescription copied from interface:EmailConnectionTesterConnects the underlying mail transport, performs authentication and closes the connection. When OAuth2 authentication is enabled, this includes obtaining an access token, so an invalid or revoked refresh token is reported as a failure.- Specified by:
testConnectionin interfaceEmailConnectionTester- Throws:
jakarta.mail.MessagingException- if the connection or authentication fails
-