MailBody

sealed
trait MailBody[F[_]]
Companion
object
class Object
trait Matchable
class Any
class Empty[F]
class Html[F]
class HtmlAndText[F]
class Text[F]

Value members

Abstract methods

def fold[A](empty: Empty[F] => A, text: Text[F] => A, html: Html[F] => A, both: HtmlAndText[F] => A): A
def withHtml(html: F[BodyContent]): MailBody[F]
def withText(text: F[BodyContent]): MailBody[F]

Concrete methods

def htmlContent(txtToHtml: BodyContent => BodyContent)(implicit ev: Applicative[F]): F[BodyContent]

Return the html or the text content. If only text is available, it is applied to the given function that may convert it into html.

Return the html or the text content. If only text is available, it is applied to the given function that may convert it into html.

def htmlPart(implicit ev: Applicative[F]): F[Option[BodyContent]]

Return only the html part if present.

Return only the html part if present.

def isEmpty: Boolean
def nonEmpty: Boolean
def textPart(implicit ev: Applicative[F]): F[Option[BodyContent]]

Return only the text part if present.

Return only the text part if present.