IP: 54.80.33.183

HELP & Documents

[...]




Date: 2016.7.22        Author: SysAdmin

Search index: (title and article description search)

No record was found!

SendMail


Web SEND MAIL

An easy way to send emails from your WEB page using JQuery, Angular, React, NodeJS or from any application that can send HTTP requests.

API for email sending. Use with WEB applications or automated messages within your application.

RESTful web service:


Method: POST

Url:   https://q-ube:37525/sendmail/

Authorization: one of two

- JWT (header)

- APIKEY (body request)


Request Body: (as JSON object)

      

  • from - The e-mail address of the sender.  (required)
    object {"name":"from name","address":"from@address.ext"}
  • sender - An e-mail address that will appear on the Sender:
    object {"name":"sender name","address":"sender@address.ext"}
  • to - An array of recipients e-mail addresses that will appear on the To: (required)
    object {"name":"to name","address":"to@address.ext"} or string "to@address.ext"
  • replyTo - An e-mail address that will appear on the Reply-To: (required)
    string "replyto@address.ext"
  • subject - The subject of the e-mail (required)
  • text - The plaintext version of the message as an Unicode string, Buffer, Stream or an object {path: '...'}
  • html - The HTML version of the message as an Unicode string, Buffer, Stream or an object {path: '...'} (required TEXT or HTML)
  • attachments - An array of attachment objects
        [ { // encoded string as an attachment 
            'filename': 'text1.txt',
            'content': 'aGVsbG8gd29ybGQh',
            'encoding': 'base64'
        }]


        or
       
      [ {   // use URL as an attachment 
            filename: 'license.txt',
            path: 'https://raw.github.com/andris9/Nodemailer/master/LICENSE'
        }]
        The entire request body size should not exceed 5Mb including attached files. If larger files should be added please use the URL attachment form like previous.

        Please check FILE API for files uploads.

  • messageId - Optional Message-Id value, random value will be generated if not set
  • date - Optional Date value, current UTC string will be used if not set
  • encoding - Optional transfer encoding for the textual parts
  • textEncoding - Sets explicitly which encoding to use for text parts (quoted-printable or base64). If not set then encoding is detected from text content (mostly ascii means quoted-printable, otherwise base64)


Response: (as JSON object)

Done: status code 200

{"error":false"message":"OK"}

Error: status code 401

{"error":true,"err:":<error object>}


Sample body command:

{"from":{"name":"Admin","address":"<test@tsbo.eu>"},
"sender":{"name":"Popescu Ion","address":"<popescu@qbis.ro>"},
"to":{"name":"Adrian","address":"<adrian@qbis.ro>"},
"replyTo":"adrian@nedcosafe.com",
"subject":"Test email - MSAS", "html":"<p>Hello world</p>",
"apikey":"A84UIIIHUHIH"}

or

{"from":"test@tsbo.eu","to":"<adrian@qbis.ro>","replyTo":"adrian@nedcosafe.com","sender":{"name":"AP","address":"popescu@qbis.ro"},"subject":"Test email - MSAS","html":"<p>Hello world !!</p>","apikey":"A84UIIIHUHIH"}

From address domain name should be one of the platform public domain names, same set within your APIKEY, the address is verified against spam with the DNS SPF TXT record  by the receiver server, it should folow anti spam policies to protect the sending service to be black listed.

Gmail, Yahoo and a lot of others mail servers will check the SPF record and eventually block your email or at least put into SPAM if the SPF record does not match.

Allowed domain names: tsbo.eu , httpsa.com , webshello.com , webcentral.eu

sample RESTClient command and response























Loading data

Loading WordBricks ...