The Telerik Platform product is retired.Learn more

Sending Email Programmatically

Sending Email Programmatically

After you have created an email template the RESTful API provides an endpoint for sending email messages based on a specified email template.

You need to provide the following details when using it:

  • In the URL, the email template's ID or name
  • In the body, a Recipients list containing recipient email addresses
  • In the body, a Context object that sets values to all placeholders used in the template

The next example adds two Recipients and sets values for the CustomSubject, PromoCode, and SpecialOffer placeholders that were defined in the template as follows:

  • {{CustomSubject}}
  • {{PromoCode}}
  • {{SpecialOffer}}
var attributes = {
    "Recipients": [
    "Context": {
        "CustomSubject": "New offer",
        "PromoCode": "New promo code value",
        "SpecialOffer": "Free popcorn for a year"

    type: "POST",
    url: '',
    contentType: "application/json",
    headers: {
        "Authorization": "Masterkey your-master-key"
    data: JSON.stringify(attributes),
    success: function(data) {
        alert("Email successfully sent.");
    error: function(error) {

See Also

Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.