#GOMAIL
Service that will allow us to connect to the MailGun API to send mails in a practical and fast way.
* Multiple sending of emails.
* Multiple answers.
The requests are sent through the POST method, to the endPoint:
Every request must have the following structure:
{
"data" : [
{
"from" : "foo@barr.com",
"subject" : "Plain content",
"body" : "Hello World",
"to" : "bar@foo.com"
},
{
"from" : "foo2@bar2.com",
"subject" : "Html content",
"body" : "<b>Hello</b><br>World",
"to" : "bar2@foo2.com"
}
]
}
Once completed the shipments, GOMAIL will give a response with the following structure:
{
"responses": [
{
"id": "<20150817005339.xxxx.zzzz@mailgun.org>",
"to": "foo@bar.com",
"msg": "Queued. Thank you."
},
{
"id": "<20150817005340.xxxx.zzzz@mailgun.org>",
"to": "bar@foo.com",
"msg": "Queued. Thank you."
}
]
}