Skip to content

Mikroservices/SendGridEmails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📧 Mikroservices - SendGridEmails

Build Status Swift 4.0 Platforms OS X | Linux

Microservice for sending emails via SendGrid system.

API

Sending email

Endpoint is responsible for sending emails.

Request

METHOD: POST
URL: /emails
BODY:
{
    "to": {
        "address": "john.doe@email.com",
        "name": "John Doe"
    },
    "from": {
        "address": "anna.doe@email.com",
        "name": "Anna Doe"
    },
    "replyTo": {
        "address": "john.doe@email.com",
        "name": "John Doe"
    },
    "title": "Important message",
    "body": "Hi. This is my message..."
}

Response

STATUS: 200 (Ok)

Developing

Downloading source code and building in command line:

$ git clone https://github.com/Mikroservices/SendGridEmails.git
$ swift package update
$ swift build

Opening project in XCode:

$ swift package generate-xcodeproj
$ open SendGridEmails.xcodeproj

Before running service you need to set one environment variable: MIKROSERVICE_SENDGRIDEMAILS_KEY. This is secret key genereted by Sendgrid service. Running service:

$ .build/debug/Run --port 8002

Contributing

You can fork and clone repository. Do your changes and pull a request.

About

📧 Microservice for sending emails via SendGrid system.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors