<?php

class EmailPedidoLoja extends Pedido
{

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

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

    try {
      parent::getInfosTemplateOrder($order_id);

      $this->mail->setTo($this->to);//$order_info['email']
      $this->mail->setSender($this->sender);//$order_info['store_name']
      $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;
    }

  }


}