funcit / zio-email

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zio-email

Build Status Download

Email using ZIO

Getting started

Add zio-email dependency to your build.sbt:

libraryDependencies += "com.funcit" %% "zio-email" % "0.1.0"

Client code

    val settings = MailerSettings(
      host = "smtp.gmail.com".some,
      port = 465.some,
      creds = Credentials("username@gmail.com", "password").some,
      ssl = true.some,
      auth = true.some
    )

    val e = Envelope(
      from = "username@gmail.com",
      subject = ("Some subject", Charset.defaultCharset.some).some,
      to = List("recipient@gmail.com"),
      content = Text("Nonsense")
    )

    unsafeRun(
      for{
        _ <- sendMail(e, settings)
      } yield ()
    )

About

License:Apache License 2.0


Languages

Language:Scala 100.0%