/**
  * @param IEntity $subject
  * @throws InvalidArgumentException
  * @return void
  */
 public function send(IEntity $subject)
 {
     if (!$subject instanceof IPresentationSpeaker) {
         return;
     }
     $subject->registerAnnouncementEmailTypeSent(IPresentationSpeaker::AnnouncementEmailRejected);
     $email = EmailFactory::getInstance()->buildEmail('*****@*****.**', $subject->getEmail());
     $email->setUserTemplate('presentation-speaker-rejected-only')->populateTemplate(array('Speaker' => $subject))->send();
 }
 /**
  * @param IEntity $subject
  * @throws InvalidArgumentException
  * @return void
  */
 public function send(IEntity $subject)
 {
     if (!$subject instanceof IPresentationSpeaker) {
         return;
     }
     $subject->registerAnnouncementEmailTypeSent(IPresentationSpeaker::AnnouncementEmailAlternate);
     $email = EmailFactory::getInstance()->buildEmail('*****@*****.**', $subject->getEmail());
     $email->setUserTemplate('presentation-speaker-alternate-only')->populateTemplate(array('Speaker' => $subject, 'ConfirmationLink' => $subject->getSpeakerConfirmationLink(), 'ScheduleMainPageLink' => Summit::get_active()->SchedUrl, 'PromoCode' => $subject->getSummitPromoCode()->getCode()))->send();
 }
 /**
  * @param IEntity $subject
  * @throws InvalidArgumentException
  * @return void
  */
 public function send(IEntity $subject)
 {
     if (!$subject instanceof Member) {
         return;
     }
     $sender = Member::currentUser();
     $to = $subject->getEmail();
     $from = defined('SURVEY_THANK_U_FROM_EMAIL') ? SURVEY_THANK_U_FROM_EMAIL : Config::inst()->get('Email', 'admin_email');
     $email = EmailFactory::getInstance()->buildEmail($from, $to);
     $email->setUserTemplate('survey-builder-new-team-member')->populateTemplate(array('Sender' => $sender, 'Member' => $subject, 'Link' => Director::absoluteBaseURL() . Director::makeRelative('surveys')))->send();
 }