Log in
Model

Template

Magento\Email\Model\Template

What it does

This class represents an email template in Magento 2 and is used to create, load, and process transactional emails.

Developers use this class to customize email content, set template variables, process subject lines and body content, and manage email sending options like BCC, reply-to, and return paths.

It handles both custom and default email templates, applying design configurations and filtering template content with variables.

Public Methods

  • getId()
  • setId()
  • isValidForSend()
  • getType()
  • getSendingException()
  • getProcessedTemplateSubject()
  • addBcc()
  • setReturnPath()
  • setReplyTo()
  • getVariablesOptionArray()
  • beforeSave()
  • processTemplate()
  • getSubject()
  • setVars()
  • setOptions()