public interface

SoyMailBuilder

com.atlassian.stash.mail.SoyMailBuilder

Summary

Public Methods
@NotNull Iterable<MailMessage> build(Iterable<StashUser> recipients, String subject, String soyTemplateModuleName, String soyTemplateName, String cssModuleName, Map<String, Object> context, Function<MailMessage.BuilderMailMessage.Builder> messageEffector)
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 public Iterable<MailMessage> build (Iterable<StashUser> recipients, String subject, String soyTemplateModuleName, String soyTemplateName, String cssModuleName, Map<String, Object> context, Function<MailMessage.BuilderMailMessage.Builder> messageEffector)

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