private function createDevolutiveNotification($to, $userName, $link) { $context = 'devolutive_notification'; $searches = array(':date', ':name', ':link'); $replaces = array(date("d/m/Y"), $userName, $link); $recipients = array($to); return Manager_EmailMessage::createByEmailDefinitionWithRecipients($context, $searches, $replaces, $recipients); }
public function createDevolutiveEmail() { $arrEnterprise = $this->devolutive->getArrEnterprise(); $to = $arrEnterprise['E-mail']; if ($to != null && $to != '') { $userName = $this->modelUser->getUserById($this->devolutive->getUserId())->getFirstName(); $link = $_SERVER['HTTP_HOST'] . '/' . $this->devolutive->getPublicDir() . $this->devolutive->getArqName(); $context = 'devolutive_notification'; $searches = array(':date', ':name', ':link'); $replaces = array(date('d/m/Y'), $userName, $link); $recipients = array($to); Manager_EmailMessage::createByEmailDefinitionWithRecipients($context, $searches, $replaces, $recipients); } }
public function sendMailUser($data, $type) { $context = $type == 'insert' ? 'user_registered_notification' : 'user_updated_notification'; $password = isset($data['password']) ? 'Senha: ' . $data['password'] : ''; $searches = array(':date', ':firstName', ':login', ':password'); $replaces = array(date('d/m/Y'), $data['first_name'], $data['login'], $password); $recipients = array($data['email']); return Manager_EmailMessage::createByEmailDefinitionWithRecipients($context, $searches, $replaces, $recipients); }
private function createPdgcNotification($notificationType, $to) { $contextPrefix = $notificationType == 'success' ? '' : 'in'; $context = 'pdgc_' . $contextPrefix . 'eligibility_notification'; $searches = array(':date'); $replaces = array(date('d/m/Y')); $recipients = array($to); return Manager_EmailMessage::createByEmailDefinitionWithRecipients($context, $searches, $replaces, $recipients); }
private function createContactUsNotification($to, $name, $comment, $enterprise, $email, $fix_number, $cellphone, $city, $uf) { $context = 'contact_us_notification'; $searches = array(':date', ':name', ':comment', ':enterprise', ':email', ':fix_number', ':cellphone', ':city', ':uf'); $replaces = array(date("d/m/Y"), $name, $comment, $enterprise, $email, $fix_number, $cellphone, $city, $uf); $recipients = array($to); $contactUsRecipients = $this->ContactUsRecipient->getRecipientsByUf($uf); foreach ($contactUsRecipients as $recipient) { $recipients[] = $recipient->getEmail(); } return Manager_EmailMessage::createByEmailDefinitionWithRecipients($context, $searches, $replaces, $recipients); }
public function sendEmailLostPassword($to, $firstName, $login, $pass) { $context = 'lost_password_notification'; $searches = array(':date', ':firstName', ':login', ':password'); $replaces = array(date('d/m/Y'), $firstName, $login, $pass); $recipients = array($to); Manager_EmailMessage::createByEmailDefinitionWithRecipients($context, $searches, $replaces, $recipients); return true; }
public function sendWhiteListMail($stateId, $socialName, $cnpj) { $context = 'register_without_email_notification'; $searches = array(':date', ':name', ':cnpj'); $replaces = array(date('d/m/Y'), $socialName, $cnpj); $recipients = self::getWhiteListEmailRecipient($stateId); return Manager_EmailMessage::createByEmailDefinitionWithRecipients($context, $searches, $replaces, $recipients); }