(self, name, from_email=None, from_name=None, subject=None, code=None, text=None, publish=True, labels=[])
return self.master.call('templates/add', _params)
Add a new template

        Args:
           name (string): the name for the new template - must be unique
           from_email (string): a default sending address for emails sent using this template
           from_name (string): a default from name to be used
           subject (string): a default subject line to be used
           code (string): the HTML code for the template with mc:edit attributes for the editable elements
           text (string): a default text part to be used when sending with this template
           publish (boolean): set to false to add a draft template without publishing
           labels (array): an optional array of up to 10 labels to use for filtering templates::
               labels[] (string): a single label

        Returns:
           struct.  the information saved about the new template::
               slug (string): the immutable unique code name of the template
               name (string): the name of the template
               labels (array): the list of labels applied to the template::
                   labels[] (string): a single label

               code (string): the full HTML code of the template, with mc:edit attributes marking the editable elements - draft version
               subject (string): the subject line of the template, if provided - draft version
               from_email (string): the default sender address for the template, if provided - draft version
               from_name (string): the default sender from name for the template, if provided - draft version
               text (string): the default text part of messages sent with the template, if provided - draft version
               publish_name (string): the same as the template name - kept as a separate field for backwards compatibility
               publish_code (string): the full HTML code of the template, with mc:edit attributes marking the editable elements that are available as published, if it has been published
               publish_subject (string): the subject line of the template, if provided
               publish_from_email (string): the default sender address for the template, if provided
               publish_from_name (string): the default sender from name for the template, if provided
               publish_text (string): the default text part of messages sent with the template, if provided
               published_at (string): the date and time the template was last published as a UTC string in YYYY-MM-DD HH:MM:SS format, or null if it has not been published
               created_at (string): the date and time the template was first created as a UTC string in YYYY-MM-DD HH:MM:SS format
               updated_at (string): the date and time the template was last modified as a UTC string in YYYY-MM-DD HH:MM:SS format

        Raises:
           InvalidTemplateError: The given template name already exists or contains invalid characters
           InvalidKeyError: The provided API key is not a valid Mandrill API key
           Error: A general Mandrill error has occurred
Add a new template
Add a new template
def add(self, name, from_email=None, from_name=None, subject=None, code=None, text=None, publish=True, labels=[]):
        """Add a new template

        Args:
           name (string): the name for the new template - must be unique
           from_email (string): a default sending address for emails sent using this template
           from_name (string): a default from name to be used
           subject (string): a default subject line to be used
           code (string): the HTML code for the template with mc:edit attributes for the editable elements
           text (string): a default text part to be used when sending with this template
           publish (boolean): set to false to add a draft template without publishing
           labels (array): an optional array of up to 10 labels to use for filtering templates::
               labels[] (string): a single label

        Returns:
           struct.  the information saved about the new template::
               slug (string): the immutable unique code name of the template
               name (string): the name of the template
               labels (array): the list of labels applied to the template::
                   labels[] (string): a single label

               code (string): the full HTML code of the template, with mc:edit attributes marking the editable elements - draft version
               subject (string): the subject line of the template, if provided - draft version
               from_email (string): the default sender address for the template, if provided - draft version
               from_name (string): the default sender from name for the template, if provided - draft version
               text (string): the default text part of messages sent with the template, if provided - draft version
               publish_name (string): the same as the template name - kept as a separate field for backwards compatibility
               publish_code (string): the full HTML code of the template, with mc:edit attributes marking the editable elements that are available as published, if it has been published
               publish_subject (string): the subject line of the template, if provided
               publish_from_email (string): the default sender address for the template, if provided
               publish_from_name (string): the default sender from name for the template, if provided
               publish_text (string): the default text part of messages sent with the template, if provided
               published_at (string): the date and time the template was last published as a UTC string in YYYY-MM-DD HH:MM:SS format, or null if it has not been published
               created_at (string): the date and time the template was first created as a UTC string in YYYY-MM-DD HH:MM:SS format
               updated_at (string): the date and time the template was last modified as a UTC string in YYYY-MM-DD HH:MM:SS format

        Raises:
           InvalidTemplateError: The given template name already exists or contains invalid characters
           InvalidKeyError: The provided API key is not a valid Mandrill API key
           Error: A general Mandrill error has occurred
        """
        _params = {'name': name, 'from_email': from_email, 'from_name': from_name, 'subject': subject, 'code': code, 'text': text, 'publish': publish, 'labels': labels}
        return self.master.call('templates/add', _params)
def add ( self , name , from_email = None , from_name = None , subject = None , code = None , text = None , publish = True , labels = [ ] ) : _params = { 'name' : name , 'from_email' : from_email , 'from_name' : from_name , 'subject' : subject , 'code' : code , 'text' : text , 'publish' : publish , 'labels' : labels } return self . master . call ( 'templates/add' , _params )