• Stars
    star
    17
  • Rank 1,238,241 (Top 25 %)
  • Language
    Scala
  • License
    MIT License
  • Created almost 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mailgun API implementation in Scala

Codacy Badge Build Status

mailgun4s

Updated project originally forked from https://github.com/Nycto/mailgun-scala but since has been completely re-written.

A Scala wrapper around the Mailgun API. Their documentation can be found here:

http://documentation.mailgun.com

Currently only supports sending messages, but more functionality will be added as needed or requested.

Example

Note that as of 1.1, we now use cats-effect instead of Futures.

The following example shows how to instantiate and send an email:

import org.matthicks.mailgun._
import java.io._
import scala.concurrent._
import cats.effect.IO

val mailgun = new Mailgun("samples.mailgun.org", "key-YOUR-MAILGUN-KEY")
val io: IO[MessageResponse] = mailgun.send(Message.simple(
  from = EmailAddress("[email protected]", "Test App"),
  to = List(EmailAddress("[email protected]", "Joe User")),
  subject = "Mailgun4s Rules!",
  text = Some("This is the testing text"),
  html = Some("<html><b>This</b> <i>seems</i> <img src=\"cid:example.jpg\"/> to <h1>work!</h1></html>")
).withInline(new File("example.jpg"), "image/jpeg"))

io.map { result =>
  println(s"Result: $result")
}

Adding it to your Project

Add the following directives to your build.sbt file:

libraryDependencies ++= Seq(
    "org.matthicks" %% "mailgun4s" % "1.1.0"
)

License

This library is released under the MIT License, which is pretty spiffy. You should have received a copy of the MIT License along with this program. If not, see http://www.opensource.org/licenses/mit-license.php.

More Repositories

1

scribe

The fastest logging library in the world. Built from scratch in Scala and programmatically configurable.
Scala
514
star
2

youi

Next generation user interface and application development in Scala and Scala.js for web, mobile, and desktop.
Scala
209
star
3

reactify

The first and only true Functional Reactive Programming framework for Scala.
Scala
85
star
4

scarango

ArangoDB client written in Scala
Scala
59
star
5

scalarelational

Type-Safe framework for defining, modifying, and querying SQL databases
Scala
58
star
6

lucene4s

Light-weight convenience wrapper around Lucene to simplify complex tasks and add Scala sugar.
Scala
54
star
7

media4s

Scala command-line wrapper around ffmpeg, ffprobe, ImageMagick, and other tools relating to media.
Scala
34
star
8

perfolation

Performance focused interpolation
Scala
30
star
9

profig

Powerful configuration management for Scala (JSON, properties, command-line arguments, and environment variables)
Scala
28
star
10

sgine

Scala Engine for OpenGL-based Desktop, Android, and iOS game and business development.
Scala
23
star
11

neo4akka

Neo4j Scala client using Akka-Http
Scala
15
star
12

powerscala

Powerful framework providing many useful utilities and features on top of the Scala language.
Scala
15
star
13

scala-stripe

Complete Browser and Server client integration of Stripe in Scala and Scala.js
Scala
12
star
14

spice

Powerful client / server technology for Scala
Scala
9
star
15

jefe

Manages installation, updating, downloading, launching, error reporting, and more for your application.
Scala
8
star
16

googleapi.scala.js

Wrapper around Google APIs
Scala
6
star
17

scalajs-pixijs

Scala.js facade for Pixi.js
JavaScript
6
star
18

giant-scala

Advanced functionality for working with MongoDB in Scala
Scala
6
star
19

scalapass

Useful tools for managing storage and validation of passwords in Scala applications
Scala
5
star
20

pdf4s

Simplified wrapper to create PDFs in Scala
Scala
5
star
21

outrgl

DEPRECATED: Please use http://youi.io going forward
Scala
5
star
22

nextui

UI Abstraction Framework
Scala
4
star
23

youi-designer

User interface designer tool to create, edit, import, export, and generate user interfaces for youi.
Scala
4
star
24

pmc

Project Management in Code - An incredibly straight-forward project management and build tool for Scala.
Scala
4
star
25

lightdb

Bare Metal Modular Database
Scala
4
star
26

youi-template

Infrastructure for working with existing HTML files.
Scala
4
star
27

uberzip

Very fast multi-threaded unzipping utility.
Scala
3
star
28

youi-example

Example application built on YouI
Scala
3
star
29

robobrowser

Headless Browser wrapper library providing lots of features for API-access
Scala
3
star
30

hyperscala

DEPRECATED - See https://github.com/outr/youi for something far better.
Scala
3
star
31

youi-plugin

SBT plugin for use with YouI projects
Scala
3
star
32

outrbackup

Multi-threaded backup system.
Scala
2
star
33

iconsole

Web-based terminal / console with modular integration and distributed connectivity
Scala
2
star
34

async

Scala and Scala.js framework to execute and schedule asynchronous tasks
Scala
2
star
35

batcher

Command-line tool to batch operations, pause, save, and control concurrency
Scala
2
star
36

jsdoc2scalajs

Automated conversion of JSDocs to Scala.js facades.
Scala
1
star
37

smartystreets-scala-sdk

Scala SDK for SmartyStreets (https://smartystreets.com)
Scala
1
star
38

webmidi.scala.js

Scala.js facade for Web MIDI API and https://github.com/cwilso/WebMIDIAPIShim
Scala
1
star
39

scalarelational-manual

Source for generating the ScalaRelational manual
Scala
1
star
40

sgine-desktop.g8

Desktop-only template for Sgine
Scala
1
star
41

jar-heaven

The final solution to JAR Hell
Scala
1
star
42

torrent

Prototype for bittorrent management in Scala
Scala
1
star
43

scalajs-fabricjs

Facade around Fabric.js for Scala.js
Scala
1
star
44

geoscala

Locational data index that is full-text searchable and can update itself. Complete geospatial sorting and filtering support.
Scala
1
star