Package org.nuxeo.mail
Class MailServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.mail.MailServiceImpl
- All Implemented Interfaces:
MailService,Adaptable,Component,Extensible,TimestampedService
- Since:
- 2023.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final Map<String,MailSender> static final StringFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionregisterJndiSMTPSender(String jndiName) Deprecated.voidsendMail(MailMessage msg) voidstart(ComponentContext context) Start the component.voidstop(ComponentContext context) Stop the component.Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterContribution, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
DEFAULT_SENDER
- See Also:
-
SENDERS_XP
- See Also:
-
senders
-
-
Constructor Details
-
MailServiceImpl
public MailServiceImpl()
-
-
Method Details
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
stop
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Overrides:
stopin classDefaultComponent- Throws:
InterruptedException
-
sendMail
- Specified by:
sendMailin interfaceMailService
-
registerJndiSMTPSender
Deprecated.since 2023.4 This is a fallback method to register aJndiSMTPMailSenderon the fly when only given a custom JNDI session name. Use aMailSenderDescriptorto define a customMailSenderinstead- Returns:
- the sender name to use in
MailMessage
-
JndiSMTPMailSenderon the fly when only given a custom JNDI session name.