Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/funcit/zio-email
https://github.com/funcit/zio-email
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/funcit/zio-email
- Owner: funcit
- License: apache-2.0
- Created: 2019-08-01T15:32:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-13T14:29:17.000Z (about 5 years ago)
- Last Synced: 2024-05-20T22:12:32.978Z (6 months ago)
- Language: Scala
- Size: 15.6 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zio - zio-email
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 ()
)
```