|
|
@@ -309,6 +309,36 @@ class User extends Model {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @return bool
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ public function sendDocumentationEmail(): bool {
|
|
|
+
|
|
|
+ // Content
|
|
|
+ $name = htmlspecialchars($this->first_name);
|
|
|
+
|
|
|
+ // Build
|
|
|
+ $builder = new EmailBuilder;
|
|
|
+ $builder->addParagraph("<b>" . sprintf(__("Hi %s"), $name) . "</b>");
|
|
|
+ $builder->addLeadParagraph(__("Thanks for registering with us!"));
|
|
|
+ $builder->addParagraph(__("The good news is that we have tests for you straight away."));
|
|
|
+ $builder->addParagraph(__("We are testing if you are asked for ID in a pubs and also in amusement arcades before playing a slot machine. I have attached two documents with the test protocol for you to read and we will assign you the tests. Take a look at the protocol and let us know when you are ready."));
|
|
|
+ $content = $builder->build();
|
|
|
+
|
|
|
+ // Send
|
|
|
+
|
|
|
+ $mail = new Email;
|
|
|
+ $mail->setHtmlContent($content);
|
|
|
+ $mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
|
|
|
+ $mail->addAddress($this->email, $this->getDisplayName());
|
|
|
+ $mail->addAttachment("public/files/testing_procedure_arcades.pdf", "Testing Procedure - Arcades.pdf");
|
|
|
+ $mail->addAttachment("public/files/testing_procedure_pubs.pdf", "Testing Procedure - Pubs.pdf");
|
|
|
+ $mail->setSubject(__("Documentation"));
|
|
|
+
|
|
|
+ return $mail->send();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @return bool
|
|
|
*/
|