This will upload an attachment to S3 and return a download link to it. It requires an Attachment and returns a UploadAttachmentResponse.
This will upload an attachment to S3 and return a download link to it. It requires an JSON Attachment and returns a UploadAttachmentResponse.
This will send a new E-Mail to all addresses specified into the JSON object. This needs a JSON SendEmailRequest.
This will get and return the send statistics from AWS of the last two weeks. It will return a SendStatistics JSON object.
This is a multipart form data object used to transmit the attachment in binary form.
attachment = File
: The binary file
A simple attachment for an E-Mail
name = String
: The file name of the attachment.mimeType = String
: The mime type of the attachmentdata = String
: A base64 encoded string of the file
dataPoints = Array
: An Array of DataPoints
A DataPoint
is a JSON object storing the send statistics of the last 15 min.
after the timestamp
.
timestamp = Number
: Java Date (passed milliseconds since January 1, 1970 00:00:00.000 GMT)deliveryAttempts = Number
: Number of delivery attemptsbounces = Number
: Number of bouncescomplaints = Number
: Number of complaintsrejects = Number
: Number of rejects
Will be returned from POST /uploadAttachment/
.
statusMessage
: Message containing errors.url
: Download URL of the attachment on S3
This is a JSON object containing all information to send the E-Mail.
toEmailList = Array
: An array of addresses the E-Mail should be sent tosubject = String
: The mail's subjectmessageBody = String
: The main message of the E-Mail (can be HTML)attachmentList = Array
: An array of Attachments (This is optional)
$ curl -F attachment=@localFileName http://localhost:10001/uploadAttachmentBin
{"statusMessage":"Uploaded attachment.","url":"https://example.s3.eu-central-1.amazonaws.com/a_very_long_url"}
$ curl -H "Content-Type: application/json" -X POST -d '{"name":"anotherName.txt","mimeType":"text/plain","data":"VGhpcyBpcyBhIHRlc3Q="}' http://localhost:10001/uploadAttachmentJson
{"statusMessage":"Uploaded attachment.","url":"https://example.s3.eu-central-1.amazonaws.com/a_very_long_url"}
$ curl -H "Content-Type: application/json" -X POST -d '{"toEmailList":["[email protected]","[email protected]"],"subject":"SimpleEmailService","messageBody":"Here is a message."}' http://localhost:10001/sendEmail
{"statusMessage":"E-Mail was sent."}