SMS templates ============= +------------------------+---------------------------------------------------------------------------------+ | Address type | Mobile number, in `E.164 `_ format. | +------------------------+---------------------------------------------------------------------------------+ | Gateways | `BulkSMS `_, `BulkGate `_ | +------------------------+---------------------------------------------------------------------------------+ | Encoding | `GSM 03.38 `_ | +------------------------+---------------------------------------------------------------------------------+ | Content type | Plain text with some accented characters. | +------------------------+---------------------------------------------------------------------------------+ | Maximum content length | Multiples of 160 characters if ASCII; 70 if any unicode character. | +------------------------+---------------------------------------------------------------------------------+ | Emojis | Yes, but they shorten the message length to 70 characters. | +------------------------+---------------------------------------------------------------------------------+ | Costs | See `BulkSMS pricing `_. No affiliation. | +------------------------+---------------------------------------------------------------------------------+ .. hint:: SMS delivery through Tattler requires an account at an SMS gateway. Tattler delivers SMS through plugins, and ships with native support for two services: - `BulkSMS.com `_ (see :ref:`TATTLER_BULKSMS_TOKEN `) - `BulkGate `_ (see :ref:`TATTLER_BULKGATE_TOKEN `) Tattler has no affiliation with either provider. You can deliver SMS notifications out of the box with an account (with credits) with either of these. Alternatively, you can add support for your own delivery methods by writing a small :ref:`SMS backend plug-in `. Tattler activates all SMS gateways for which configuration is supplied. If you do configure multiple gateways, tattler falls over from one to the next until one accepts the message. SMS notifications are less common than email notifications, but let's start here because their simplicity builds a base to understand the more complex emails. Event templates are some text which gets expanded at delivery time into the final text. SMS templates are organized as follows inside the event's folder:: templates_base/ └── mywebapp/ └── password_changed/ └── sms/ <- sms vector └── body.txt <- content template This SMS template file may contain some content like this:: Hi {{ user_firstname }}. Be advised that your account password got changed today at {{ appointment_time }}. The address is {{ update_time }}. You already picture what the user will actually be texted. The message encoding is ASCII plus a `small set of frequent-use accented characters `_. Such messages may be up to 160 characters long; ASCII messages longer than this will be delivered as multiple messages, which the receiving mobile phone is capable of concatenating back together. The delivery price will obviously multiply correspondingly. Messages that include characters beyond the GSM_03.38 set -- such as an emoji, or Arabic -- can be sent too. This will reduce the maximum message length to 70. Longer content is supported (up to 400 characters) and will be broken down into multiple messages, and be priced correspondingly. BulkSMS supports multi-part messages, i.e. content exceeding a single-message length will be broken down into multiple messages, which the receiving mobile phone will be able to concatenate back together.