Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Made minor changes

The Email Templates screen lets you create and edit plain text and HTML email templates. The email template's subject and body can contain contain placeholder values  that that are dynamically replaced with values you specify when sending the email using the Mobile Backend Services (MBS) email_from_template  REST API, Titanium.Cloud.Emails.send() method or equivalent native iOS or Android method. The email can be sent as plain text, HTML, or multi-part using these methods.


An email template specifies the email subject line and body, which may be HTML or plain-text. You specify the template name when calling email_from_template, the recipients, and values for any placeholder values.

To create an email template:

  1. In Dashboard, select the Mobile Backend Services datasource to create the email template for.
  2. Select Manage Data, then click Email Templates.
  3. Click Create Email Template.
  4. Click the Code tab, and provide values for the following fields:
    1. Name – Name of the email template. You will specify this name when sending the email.
    2. Subject – The email's subject. The subject can contain placeholder values in double curly brackets.
    3. Body (HTML) – The email's HTML-formatted body text. The body can contain placeholder values in double curly brackets.
    4. Body (Plain Text) – The emailsemail's plain text-formatted body text. The body can contain contain placeholder values  in in double curly brackets.
  5. Click Preview to  to view a rendered version of the HTML body text.
    Image Modified
  6. Click Save Changes.

Below is the sample HTML used in the above screenshot:


To send an email based on a template, call the  email_from_template MBS method from your own application. For example, the following code example uses the TitianiumTitanium.Cloud.Emails.send() method to send an email based on the 'welcome_template' to a user.


The template's subject and body can contain placeholder fields delineated by double curly brackets ({{}}). When sending an email, you include a parameter for each placeholder field that specifies the value to insert. For example, suppose that your email template's subject field contains Hi {{first_name}}!. When sending the email you would include a parameter named  first_name parameter, as shown below:

Code Block
curl -F "" -F "template=welcome" -F "first_name=Joe"<YOUR APP APP KEY>