Class SendMail
- java.lang.Object
-
- org.nuxeo.ecm.automation.core.operations.notification.SendMail
-
public class SendMail extends Object
Save the session - TODO remove this?- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
asHtml
protected StringList
bcc
protected StringList
blobXpath
protected StringList
cc
static Composer
COMPOSER
Deprecated.since 11.1 due to its static modifier, it messes up tests, instantiateComposer
insteadprotected OperationContext
ctx
protected String
from
static String
ID
protected boolean
isStrict
protected static Log
log
protected javax.mail.Session
mailSession
protected String
message
protected StringList
replyto
protected boolean
rollbackOnError
protected String
subject
protected StringList
to
protected String
viewId
-
Constructor Summary
Constructors Constructor Description SendMail()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addMailBoxInfo(Mailer.Message msg, Map<String,Object> map)
protected void
addMailBoxInfoInMessageHeader(Mailer.Message msg, Mailer.Message.AS as, List<MailBox> persons)
protected String
createDocUrlWithToken(String documentUrl, String token)
protected Mailer.Message
createMessage(DocumentModel doc, String message, Map<String,Object> map)
protected void
getBlob(Object o, List<Blob> blobs)
protected String
getContent()
DocumentModel
run(DocumentModel doc)
protected void
send(DocumentModel doc)
-
-
-
Field Detail
-
log
protected static final Log log
-
COMPOSER
@Deprecated(since="11.1") public static final Composer COMPOSER
Deprecated.since 11.1 due to its static modifier, it messes up tests, instantiateComposer
instead
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
ctx
protected OperationContext ctx
-
from
protected String from
-
to
protected StringList to
-
mailSession
protected javax.mail.Session mailSession
-
cc
protected StringList cc
- Since:
- 5.9.1
-
bcc
protected StringList bcc
- Since:
- 5.9.1
-
replyto
protected StringList replyto
- Since:
- 5.9.1
-
subject
protected String subject
-
message
protected String message
-
asHtml
protected boolean asHtml
-
blobXpath
protected StringList blobXpath
-
rollbackOnError
protected boolean rollbackOnError
-
isStrict
protected boolean isStrict
- Since:
- 5.9.1
-
viewId
protected String viewId
-
-
Method Detail
-
run
public DocumentModel run(DocumentModel doc) throws freemarker.template.TemplateException, RenderingException, OperationException, javax.mail.MessagingException, IOException
- Throws:
freemarker.template.TemplateException
RenderingException
OperationException
javax.mail.MessagingException
IOException
-
getContent
protected String getContent() throws OperationException, IOException
- Throws:
OperationException
IOException
-
send
protected void send(DocumentModel doc) throws freemarker.template.TemplateException, RenderingException, OperationException, javax.mail.MessagingException, IOException
- Throws:
freemarker.template.TemplateException
RenderingException
OperationException
javax.mail.MessagingException
IOException
-
addMailBoxInfo
protected void addMailBoxInfo(Mailer.Message msg, Map<String,Object> map) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
- Since:
- 5.9.1
-
addMailBoxInfoInMessageHeader
protected void addMailBoxInfoInMessageHeader(Mailer.Message msg, Mailer.Message.AS as, List<MailBox> persons) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
- Since:
- 5.9.1
-
createMessage
protected Mailer.Message createMessage(DocumentModel doc, String message, Map<String,Object> map) throws javax.mail.MessagingException, freemarker.template.TemplateException, RenderingException, IOException
- Throws:
javax.mail.MessagingException
freemarker.template.TemplateException
RenderingException
IOException
-
-