public interface

SoyMailBuilder

com.atlassian.stash.mail.SoyMailBuilder

Summary

Public Methods
@NotNull @Deprecated Iterable<MailMessage> build(Iterable<StashUser> recipients, String subject, String soyTemplateModuleName, String soyTemplateName, String cssModuleName, Map<StringObject> context, Function<MailMessage.BuilderMailMessage.Builder> messageEffector)
This method is deprecated. in 3.0 and scheduled for removal in 4.0. This method does not correctly support localization for the message subject. Use build(SoyMailMessageRequest) instead.
@NotNull Iterable<MailMessage> build(SoyMailMessageRequest message)
Creates mail messages to the given recipients, using the supplied context to render the soy template specified, then inlining the given CSS with the given subject.

Public Methods

@NotNull @Deprecated public Iterable<MailMessage> build (Iterable<StashUser> recipients, String subject, String soyTemplateModuleName, String soyTemplateName, String cssModuleName, Map<StringObject> context, Function<MailMessage.BuilderMailMessage.Builder> messageEffector)

This method is deprecated.
in 3.0 and scheduled for removal in 4.0. This method does not correctly support localization for the message subject. Use build(SoyMailMessageRequest) instead.

Creates mail messages to the given recipients, using the supplied context to render the soy template specified, then inlining the given CSS with the given subject.

Parameters
cssModuleName This is passed to the HtmlCssInliner.
messageEffector Can be passed that will be given the opportunity to add to the MailMessage.Builder, returning a new Builder to use for the MailMessage. The SoyMailer will set the text, to, subject etc, so these can be over-ridden or used to set headers.
Returns
  • created mail messages

@NotNull public Iterable<MailMessage> build (SoyMailMessageRequest message)

Creates mail messages to the given recipients, using the supplied context to render the soy template specified, then inlining the given CSS with the given subject.

Parameters
message message containing message details to be sent
Returns
  • created mail messages