MailBody

emil.MailBody
See theMailBody companion object
sealed trait MailBody[F[_]]

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Empty[F]
class Html[F]
class HtmlAndText[F]
class Text[F]

Members list

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.

Attributes

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

Return only the html part if present.

Return only the html part if present.

Attributes

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.

Attributes