mail-client

Scala mailer built on top of the JavaMail API.

License

License

MIT
Categories

Categories

CLI User Interface
GroupId

GroupId

com.solarmosaic.client
ArtifactId

ArtifactId

mail-client_2.11
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

mail-client
Scala mailer built on top of the JavaMail API.
Project URL

Project URL

https://github.com/solarmosaic/mail-client
Project Organization

Project Organization

com.solarmosaic.client
Source Code Management

Source Code Management

https://github.com/solarmosaic/mail-client

Download mail-client_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.solarmosaic.client/mail-client_2.11/ -->
<dependency>
    <groupId>com.solarmosaic.client</groupId>
    <artifactId>mail-client_2.11</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.solarmosaic.client/mail-client_2.11/
implementation 'com.solarmosaic.client:mail-client_2.11:0.1.0'
// https://jarcasting.com/artifacts/com.solarmosaic.client/mail-client_2.11/
implementation ("com.solarmosaic.client:mail-client_2.11:0.1.0")
'com.solarmosaic.client:mail-client_2.11:jar:0.1.0'
<dependency org="com.solarmosaic.client" name="mail-client_2.11" rev="0.1.0">
  <artifact name="mail-client_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.solarmosaic.client', module='mail-client_2.11', version='0.1.0')
)
libraryDependencies += "com.solarmosaic.client" % "mail-client_2.11" % "0.1.0"
[com.solarmosaic.client/mail-client_2.11 "0.1.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.7
javax.mail : mail jar 1.4.7

test (3)

Group / Artifact Type Version
org.jvnet.mock-javamail : mock-javamail jar 1.9
org.specs2 : specs2-core_2.11 jar 3.6.5
org.specs2 : specs2-mock_2.11 jar 3.6.5

Project Modules

There are no modules declared in this project.

Scala SMTP Mail Client

A Scala SMTP mailer built on top of the JavaMail API.

Installation

Releases are available in Maven for Scala 2.10 and Scala 2.11. If you're using sbt, simply add the following to your build.sbt file:

libraryDependencies += "com.solarmosaic.client" %% "mail-client" % "0.1.0"

Usage

import com.solarmosaic.client.mail._
import com.solarmosaic.client.mail.configuration._
import com.solarmosaic.client.mail.content._

class ExampleClass extends EnvelopeWrappers {
  val config = SmtpConfiguration("localhost", 25)
  val mailer = Mailer(config)
  val content = Multipart(
    parts = Seq(Text("text"), Html("<p>text</p>")),
    subType = MultipartTypes.alternative
  )

  val envelope = Envelope(
    from = "[email protected]",
    to = Seq("[email protected]"),
    subject = "test",
    content = content
  )

  mailer.send(envelope)
}

For more detailed usage examples you may refer to the unit tests inside this repository.

Contributing

This repository is a mirror of our internal Gerrit repository. Therefore, we do not support merging code through Github itself. Please feel free to create issues or open pull requests here and we will do our best to resolve them internally.

Inspiration

This library was inspired by courier and scala-mail.

License

MIT

com.solarmosaic.client

Mosaic

Empowering millions of people to profit from clean energy.

Versions

Version
0.1.0