Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.53 KB

README.md

File metadata and controls

48 lines (37 loc) · 1.53 KB

sendgrid-scala

Build Status

sengrid-scala is a SendGrid client, for now it's just a copy of sendgrid-java so the code is not very good. But I want to make it more in scala style by using akka http for sending requests and make API more friendly.

For SendGrid API documentation, see https://sendgrid.com/docs/API_Reference/index.html

Installation

If you use SBT, you can include sendgrid-scala in your project with

resolvers += "SonaType" at "https://oss.sonatype.org/content/groups/public"
libraryDependencies += "org.miszkiewicz" %% "sendgrid-scala" % "0.2-SNAPSHOT"

Example usage

val sendGrid = new SendGrid(UserCredentials("myLogin", "myPassword"))
val smtpApi = SmtpApi(
          substitutions = Map("-link-" -> Seq("https://github.com/dmiszkiewicz")),
          filters = Seq(Templates(true, "e317f565-ee21-4f2d-85a1-b3eaf775896e"))
        )
        val sendGridEmail = Email(
          html = Some("Look at my GitHub: "),
          subject = Some("Look at my GitHub!"),
          from = Some("dominik223@gmail.com"),
          fromName = Some("Dominik Miszkiewicz"),
          to = Seq("dominik223@gmail.com"),
          smtpAPI = Some(smtpApi)
        )
sendGrid.send(sendGridEmail)

Issues and Pull Requests

Feel free to send Pull Requests and ask me anything, I can help you integrate this library in your code.

license

See LICENSE.