Skip to content

CartThrob/ee-template-mailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Toolbox Template Mailer Helper

This helper is used with a module or extension to send emails that use EE templates. This supports PHP, globals, and entries loops.

Developed by eecoder.

Usage

  • To get started drop the file in a helpers directory in your module or extension.

      $this->EE->load->library('template_mailer');
                  
      $email = new Template_mailer();
    
      
      $email->to($this->EE->config->item('webmaster_email'));
      $email->from($this->EE->config->item('webmaster_email'));
      $email->subject('Subject');
      $email->set(array(
      	'email_address' => '[email protected]',
      ));
    
      $result = $email->send('_messages/email-template');
    

$email->set() creates variables for use in the email template, and are prepended with email:. The variable above would be {email:email_address}

About

Use EE Templates as emails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages