class Place::TemplateMailer

Overview

This driver uses metadata templates to send emails via the SMTP mailer. It should be configured as Mailer_1 with the next mailer in the chain as Mailer_2.

It also updates metadata in the staff API with available fields for use in email templates.

Included Modules

Defined in:

place/template_mailer.cr

Constant Summary

SEPERATOR = "."

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

This driver uses metadata templates to send emails via the SMTP mailer. It should be configured as Mailer_1 with the next mailer in the chain as Mailer_2.

It also updates metadata in the staff API with available fields for use in email templates.


Instance Method Detail

def building_zone_id : String #

[View source]
def building_zone_ids : Array(String) #

[View source]
def clear_template_cache(zone_id : String | Nil = nil) #

[View source]
def fetch_templates(zone_id : String | Nil) : Array(Template) #

fetch templates from cache or metadata


[View source]
def find_template?(template : String, zone_ids : Array(String)) : Template | Nil #

[View source]
def generate_png_qrcode(text : String, size : Int32 = 128) : String #

[View source]
def generate_svg_qrcode(text : String) : String #

[View source]
def get_local_zone_id(zone_ids : Array(String)) : String | Nil #

[View source]
def get_template_fields?(zone_id : String) : Hash(String, MetadataTemplateFields) | Nil #

[View source]
def get_templates?(zone_id : String) : Array(Template) | Nil #

get templates from metadata


[View source]
def get_zone_ids?(tag : String) : Array(String) | Nil #

[View source]
def level_zone_ids : Array(String) #

[View source]
def mailer #

[View source]
def on_update #

[View source]
def org_zone_id : String #

[View source]
def org_zone_ids : Array(String) #

[View source]
def region_zone_ids : Array(String) #

[View source]
def send_mail(to : String | Array(String), subject : String, message_plaintext : String | Nil = nil, message_html : String | Nil = nil, resource_attachments : Array(ResourceAttachment) = [] of ResourceAttachment, attachments : Array(Attachment) = [] of Attachment, cc : String | Array(String) = [] of String, bcc : String | Array(String) = [] of String, from : String | Array(String) | Nil = nil, reply_to : String | Array(String) | Nil = nil) #

[View source]
def send_template(to : String | Array(String), template : Tuple(String, String), args : TemplateItems, resource_attachments : Array(ResourceAttachment) = [] of ResourceAttachment, attachments : Array(Attachment) = [] of Attachment, cc : String | Array(String) = [] of String, bcc : String | Array(String) = [] of String, from : String | Array(String) | Nil = nil, reply_to : String | Array(String) | Nil = nil) #

[View source]
def sticky_template_fields(zone_id : String) : Hash(String, MetadataTemplateFields) #

[View source]
def template_cache : Hash(String, {Int64, Array(Hash(String, Int64 | String))}) #

[View source]
def update_template_fields(zone_id : String) #

[View source]