<?php

class EmailCliente extends Cliente
{

  public function __construct($registry)
  {
    parent::__construct($registry);
    parent::getConfigMail();
  }

  public function sendTask($typeemail, $cliente_id, $attribute_value)
  {

    try {
      $this->getInfosCustomerTemplate($cliente_id);

      $this->mail->setTo($this->to);
      $this->mail->setSender($this->sender);
      $this->mail->setSubject(html_entity_decode($this->subject, ENT_QUOTES, 'UTF-8'));
      $this->mail->setHtml(parent::getTemplate($typeemail));
      $this->mail->setText(html_entity_decode($this->text, ENT_QUOTES, 'UTF-8'));
      $this->mail->send(true);
    } catch (Exception $e) {
      throw $e;
    }

  }


}