mailinator

Provides methods for working with Mailinator service - www.mailinator.com

delete

Deletes sepcific email.

** Example of the returned object:**

{
 "status": "ok"
}

Parameters:

Returns:

Object - Status.

fetch

Fetches specific email.

** Example of the returned object:**

{
 "data":
   {
     "fromfull":"noreply@example.com",
     "headers": { ... email headers ... },
     "subject":"test subject",
     "requestId":"REQUEST ID",
     "parts": [
       {
         "headers":{ "content-type":"text/plain; charset=utf-8" },
         "body":"EMAIL BODY (TEXT)"
       },
       {
         "headers":{ "content-type":"text/html; charset=utf-8" },
         "body":"EMAIL BODY (HTML)"
       }
     ],
     "from":"Test Tester",
     "origfrom":"Test Tester noreply@example.com",
     "to":"cb-test-2",
     "id":"RANDOMLY GENERATED ID",
     "time":1491200030000,
     "seconds_ago":1174
  },
 "apiEmailFetchesLeft":1999
}

Parameters:

Returns:

Object - Email details. E.g.

getBody

Extracts first available email body.

Parameters:

Returns:

String - Email body.

getSubject

Extracts email's subject.

Parameters:

Returns:

String - Email subject.

init

Initializes mailinator module.

Parameters:

list

Fetches inbox messages or all saved messages.

** Example of the returned object:**

{
 "messages": [
   {
     "fromfull": "noreply@example.com",
     "subject": "Subject",
     "from": "Test Tester",
     "origfrom": "Test Tester noreply@example.com",
     "to": "inbox-name",
     "id": "RANDOMLY GENERATED ID",
     "time": 1491200030000,
     "seconds_ago": 234
   },
 ]
}

Parameters:

Returns:

Object - List containing message details.

Last updated