class Place::TemplateMailer
- Place::TemplateMailer
- PlaceOS::Driver
- Reference
- Object
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
- PlaceOS::Driver::Interface::Mailer
Defined in:
place/template_mailer.crConstant Summary
-
SEPERATOR =
"."
Class Method Summary
-
.driver_interface : String
This driver uses metadata templates to send emails via the SMTP mailer.
Instance Method Summary
- #building_zone_id : String
- #building_zone_ids : Array(String)
- #clear_template_cache(zone_id : String | Nil = nil)
-
#fetch_templates(zone_id : String | Nil) : Array(Template)
fetch templates from cache or metadata
- #find_template?(template : String, zone_ids : Array(String)) : Template | Nil
- #generate_png_qrcode(text : String, size : Int32 = 128) : String
- #generate_svg_qrcode(text : String) : String
- #get_local_zone_id(zone_ids : Array(String)) : String | Nil
- #get_template_fields?(zone_id : String) : Hash(String, MetadataTemplateFields) | Nil
-
#get_templates?(zone_id : String) : Array(Template) | Nil
get templates from metadata
- #get_zone_ids?(tag : String) : Array(String) | Nil
- #level_zone_ids : Array(String)
- #mailer
- #on_update
- #org_zone_id : String
- #org_zone_ids : Array(String)
- #region_zone_ids : Array(String)
- #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)
- #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)
- #sticky_template_fields(zone_id : String) : Hash(String, MetadataTemplateFields)
- #template_cache : Hash(String, {Int64, Array(Hash(String, Int64 | String))})
- #update_template_fields(zone_id : String)
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
fetch templates from cache or metadata
def get_template_fields?(zone_id : String) : Hash(String, MetadataTemplateFields) | Nil
#
get templates from metadata
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)
#
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)
#