Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/funcit/zio-email


https://github.com/funcit/zio-email

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# zio-email

[![Build Status](https://travis-ci.org/funcit/zio-email.svg?branch=master)](https://travis-ci.org/funcit/zio-email)
[![Download](https://api.bintray.com/packages/funcit/zio/zio-email/images/download.svg?version=0.1.0) ](https://bintray.com/funcit/zio/zio-email/0.1.0/link)

Email using [ZIO](https://zio.dev/)

## 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("[email protected]", "password").some,
ssl = true.some,
auth = true.some
)

val e = Envelope(
from = "[email protected]",
subject = ("Some subject", Charset.defaultCharset.some).some,
to = List("[email protected]"),
content = Text("Nonsense")
)

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