コード例 #1
0
 /**
  * Sends out a confirmation mail to the registered account
  *
  * @param Account $account
  */
 private function sendConfirmationMail(Account $account)
 {
     $mailText = "Congratulations " . $account->getName() . ", you registered at Eternal Deztiny. To complete your registration, ";
     $server = 'ed.com';
     if (array_key_exists('SERVER_NAME', $_SERVER)) {
         $server = $_SERVER['SERVER_NAME'];
     }
     $mailText .= "follow the link:\n" . $server . "/account/activate/" . $account->getUserHash();
     $this->appMailService->sendMail($account->getEmail(), 'Your registration at Eternal Deztiny', $mailText);
 }
コード例 #2
0
 private function sendAssignmentMail(Account $account, array $assignments, string $strategy)
 {
     $target_main = implode(',', array_keys($assignments, strtolower($account->getName())));
     $target_mini = implode(',', array_keys($assignments, strtolower($account->getMini())));
     $text = 'Hello ' . $account->getName() . ". Your targets are:\n";
     if ($target_main) {
         $text .= $account->getName() . ': ' . $target_main . "\n";
     }
     if ($target_mini) {
         $text .= $account->getMini() . ': ' . $target_mini . "\n";
     }
     $text .= 'War Strategy: ' . $strategy . "\n\n";
     $text .= 'Good Luck. Further information can be found under ' . $_SERVER['SERVER_NAME'] . '/warclaim/';
     $this->appMailService->sendMail($account->getEmail(), 'A new war has started!', $text);
 }
コード例 #3
0
 private function sendApplicationMail(Application $application, string $mail_address)
 {
     $mailText = $application->getName() . " has applied to join Eternal Destiny.\n" . "Ingame-Tag: #" . $application->getTag() . "\n" . "E-Mail adress: " . $application->getEmail() . "\n" . "Age: " . $application->getAge() . "\n" . "Town-Hall Level: " . $application->getTh() . "\n" . "Current war stars: " . $application->getWarStars() . "\n" . "Current spoils of war status: " . $application->getSpoilsOfWar() . "\n" . "Current gold grab status: " . $application->getGoldGrab() . "\n" . "Current nice and tidy status: " . $application->getNiceAndTidy() . "\n" . "About me: " . $application->getInfos() . "\n" . "Why I want to join ED: " . $application->getWhy() . "\n" . "Strategies: " . $application->getStrategies() . "\n" . "Process application at: " . $_SERVER['SERVER_NAME'] . '/applynow/detail/' . $application->getId();
     $this->appMailService->sendMail($mail_address, 'New application has arrived!', $mailText, [getcwd() . '/public' . $application->getBasePic(), getcwd() . '/public' . $application->getProfilePic()]);
 }
コード例 #4
0
 /**
  * Sends out a lost password mail to the given account
  * @param Account $account
  */
 private function sendLostPasswordMail(Account $account)
 {
     $mailText = 'Hello ' . $account->getName() . ', a password reset for your account was requested. ' . 'If you didn\'t request a password reset, you don\'t need to do anything. If you really want to ' . 'reset your password, please follow the given link: ' . $_SERVER['SERVER_NAME'] . '/account/resetpassword/' . $account->getUserHash();
     $this->appMailService->sendMail($account->getEmail(), 'Password Reset', $mailText);
 }