Fantasy Engine user guide 1.1.0 / Server services
For the developer / QC team that sets up e-mail: the AdminCP settings, sending at once or through the queue, testing and troubleshooting.
How the site sends mail#
Last updated: 2026-11-25 · v1.1.0
The site sends: sign-up verification, password recovery codes, password-changed notices, member invitations, the daily digest of unread notifications and the Fantasy Engine mails: contest entered (the picks), contest cancelled (refund), contest won (prize) and the invitation to a contest. Every mail is built from a mail template (AdminCP → Site Settings → Mail Templates) in the language of the member it goes to, its greeting included (the site's default language for an address without an account).
- The SMTP account is set in the AdminCP, not in
.env: theMAIL_*lines of.envare ignored. - A mail goes out at once during the request, or through the outbox when Email queue is on (Send at once or queue).
- Failures never break the page that sent the mail: they are written to
storage/logs/shaun-mail-YYYY-MM.log. - Unsubscribe: a mail ends with "If you don't want to receive these emails in the future, please click
here to unsubscribe". The link opens a page of the site, Unsubscribe from emails: "Stop the emails site
sends to address?", with the note "Messages about your account, such as sign-in and verification codes, are still
sent." and the button Unsubscribe. Only that button puts the address on the list ("You have been unsubscribed.
site will not send you these emails any more."); opening the link alone, as a mail scanner or a link preview does,
changes nothing. A link the site did not make for that address shows "This unsubscribe link is not valid.", an address
already on the list "This address is already unsubscribed.". The links in mails sent before version 1.1.0 are no longer
valid. There is no AdminCP screen for the list: to send to an address again, delete its row from the table
mail_unsubscribes. - Always sent, also to an address on the list, and without the unsubscribe line: the account mails Welcome, Welcome with password, Welcome with verification code, Verify email, Forgot password, Two-factor verify email, Admin changes password, Active user and Inactive user. A mail to the site's own e-mail address (the Contact email of the contact form) is never held back by the list.
- The Contact email answers to the visitor: Reply in your mail program writes to the address the visitor typed in the form.
AdminCP → E-mail Settings#
Last updated: 2026-11-25 · v1.1.0
AdminCP → Site Settings → General Configuration → E-mail Settings. Each field saves when you leave it.
| Field | Value | Notes |
|---|---|---|
| From name | Fantasy Engine | empty = the site title |
| From address | [email protected] | empty = the site e-mail. Use an address of a domain your SMTP account may send for (SPF / DKIM), or mail lands in spam |
| Mail engine | SMTP | "Mail" = the server's sendmail binary (/usr/sbin/sendmail -bs -i); the installed default, rarely configured on a web server |
| Hostname | smtp.your-provider.example | with SMTP and an empty hostname no mail is sent, silently |
| Port | 587 or 465 | |
| Username, Password | the SMTP account | |
| Encryption | TLS for port 587, SSL for 465 | see the note below |
| Email queue | No (small sites) / Yes | Send at once or queue |
| Mail count | 200 | mails sent per scheduler minute when the queue is on |
| Enable email Log | No | Yes writes a line for every mail sent to the mail log (address, type and the values of the template). A password or a code is never written: the mails that carry one log "Hidden: this email carries a password or a verification code." in place of their values, and any other value named like a code, password, token, secret or key is written as [hidden] |
TLS (port 587): the mailer connects, then switches to encryption with STARTTLS - every provider on 587 offers it. SSL (port 465): encrypted from the first byte (implicit TLS). None: the same connection as TLS - the mailer still uses STARTTLS when the server offers it, and sends unencrypted only to a server that does not; with port 465 choose SSL, not None.

Verified on 2026-10-22 on a test web-installer install of the 9c4fba6 with a local SMTP sink: Encryption = TLS gives the mailer the scheme smtp and the AdminCP test mail arrived; SSL gives smtps (implicit TLS), None smtp (tests/Feature/Core/Admin/MailEncryptionTest.php).
Send at once or queue#
Last updated: 2026-11-25 · v1.1.0
| Email queue | What happens | Good for |
|---|---|---|
| No, always send emails immediately | the mail is sent inside the request (sign-up waits for the SMTP server) | small sites, a fast SMTP provider |
| Yes, enable email queue | the mail is stored in the outbox table mail_recipients; the scheduled shaun_core:mail_send sends Mail count of them every minute, oldest first | larger sites, providers with a rate limit |
- Bulk mails (invitations and other mass sends) always go through the outbox, whatever the setting, so a large send never delays a password reset.
- The Forgot password code mail is the one exception to "inside the request" with the queue off: it is handed
to the mail server after the answer has gone to the member, so the request does not wait for the SMTP server. On
Apache with
mod_phpthe browser waits anyway; there, switch the queue on (Install → Queue worker). - The outbox needs the cron line (Install → Scheduler). A mail that fails in the outbox is logged and removed (it would block the ones behind it).
QUEUE_CONNECTIONdoes not change mail. OnlySHAUN_QUEUE=truemoves mails to the queuesmail_normal/mail_many, which then need a worker of their own (Install → Queue worker); leave it unset.
mysql -e "SELECT COUNT(*) FROM fantasyengine.mail_recipients;" # mails waiting
php artisan shaun_core:mail_send # send one batch now
Verified on 2026-10-22 on a test install of the 1.0.0 standard package with a local SMTP sink: the AdminCP test mail and a template mail arrived; with Email queue on, a mail waited in the outbox and shaun_core:mail_send delivered it. (The same run showed the "TLS" encryption value failing; that was fixed in 9c4fba6 - see E-mail settings.) Re-read on 2026-11-20 against 75f021e0: only the code mail of the password reset is sent after the answer; the outbox, its command and the queues unchanged.
Send a test mail#
Last updated: 2026-11-25 · v1.1.0
- Save the E-mail Settings, then press Test send mail at the bottom of the card.
- Type an address you can read and press Submit.

mail-test - the Test email dialog over E-mail Settings (2026-10-22) - "Test email was sent successfully! Please check your inbox to make sure it is delivered." means the SMTP server accepted it: a plain-text mail with the subject Test Email and the body "Text to e-mail". Any other answer is the mailer's own error message (wrong password, refused connection, wrong port for the Encryption value).
- The test bypasses templates and the outbox. To check a real template mail, use Forgot password on the website with a member's address.
php artisan tinker --execute "Illuminate\Support\Facades\Mail::raw('Text to e-mail', fn (\$m) => \$m->subject('Test Email')->to('[email protected]')); echo 'sent';"
Expected (an exception text instead names the problem)sent
Verified on 2026-10-22 on a test web-installer install of the 9c4fba6 with a local SMTP sink: Encryption = TLS gives the mailer the scheme smtp and the AdminCP test mail arrived; SSL gives smtps (implicit TLS), None smtp (tests/Feature/Core/Admin/MailEncryptionTest.php).
Mail templates#
Last updated: 2026-11-25 · v1.1.0
AdminCP → Site Settings → Mail Templates lists every mail with its subject and content per
language. Words in brackets are filled at sending time ([site_name], [recipient_name],
[link] ...); the list of a template is shown beside it. [header] and
[footer] insert the shared header and footer templates.
Known in 1.0.0 and 1.1.0: the Fantasy Engine templates carry no [header] / [footer].
The four mails with a code - Verify email, Forgot password, Welcome with
verification code and Two-factor verify email - end their text with "The verification code will expire in
[code_minutes] minutes."; [code_minutes] is the time the site accepts a code, 6 minutes, and is in the list
of each of these templates beside [code]. A site updated from 1.0.x gets this text only in the languages
where the template still holds the 1.0.0 default ("... will expire in 5 minutes.", while the site accepted the code for
6): a text you edited is kept as you wrote it. To state the real time there, put [code_minutes] where your
text names the minutes.
Fantasy Engine - Invite friend (sent from a contest's Invite tab) reads, with the subject
[[site_name]] You have been invited to join the contest [contest_name]:
<p>[sender_name] has invited you to play the contest "[contest_name]".</p>
<p>[message_content]</p>
<p>Click <a href="[contest_link]">here</a> to join.</p>
[contest_link] opens the contest's page in the app. A site installed before 2026-10-29 still has the
seeded text with a broken [sender_name token ("[sender_name has invited you play ..."), printed as it
is: the upgrade guide, step 5 repairs it (a text you changed is left
alone).
Troubleshooting#
Last updated: 2026-11-25 · v1.1.0
| Symptom | Cause and fix |
|---|---|
| Nothing arrives, no error anywhere | Mail engine is still "Mail" (sendmail) on a server without sendmail, or SMTP with an empty Hostname (silently skipped). Choose SMTP and fill the server. |
| Every mail fails or times out right after connecting | Encryption does not match the port: TLS (or None) for 587, SSL for 465. |
| "Connection could not be established" | wrong host / port, or the server's firewall blocks outgoing SMTP (many hosts block 25 and sometimes 465 / 587). |
| "Failed to authenticate" | username / password; some providers need an app password. |
| Mails arrive late | Email queue is on and cron does not run, or Mail count is small for the volume. |
| Mails land in spam | From address not covered by the SPF / DKIM records of its domain. |
| A member gets nothing | the address is on the unsubscribe list (then he still gets the account mails, How the site sends mail), or the member has no e-mail on file. |
| Where to look | storage/logs/shaun-mail-YYYY-MM.log (every failure; every send with Enable email Log), one file a month, the last 2 months kept. |
Verified on 2026-10-22 on a test web-installer install of the 9c4fba6 with a local SMTP sink: Encryption = TLS gives the mailer the scheme smtp and the AdminCP test mail arrived; SSL gives smtps (implicit TLS), None smtp (tests/Feature/Core/Admin/MailEncryptionTest.php).
Change log#
Last updated: 2026-11-25 · v1.1.0
| Date (GMT+7) | Section | What changed |
|---|---|---|
| 2026-10-22 | all | First version, checked against daily-fantasy c68e20c; settings, test, queue and the TLS failure verified on a test install. |
| 2026-10-22 | mail-settings, mail-test, mail-troubleshooting | Encryption "TLS" works (it maps to the smtp scheme with STARTTLS, SSL to smtps): the "do not choose TLS" warning and its troubleshooting row removed, TLS recommended for 587; checked against the 9c4fba6. |
| 2026-10-28 | mail-queue | The verification note no longer reads as if "TLS" still failed (fixed in 9c4fba6). |
| 2026-10-29 | mail-templates | The Invite friend template text fixed in 1.0.0 (sender name filled, "invited you to play"), its link opens the contest page; the repair for a site installed before points to the upgrade guide. |
| 2026-11-10 | mail-templates, change-log | Version 1.1.0: the header names version 1.1.0; the known template limit now reads "Known in 1.0.0 and 1.1.0" (the Fantasy Engine templates still carry no [header] / [footer]; the mail templates did not change), and the section is re-dated (checked against daily-fantasy 9a1fa0f). In older rows and in "checked" lines of other sections, internal review labels and the wording of the test sites taken out; content unchanged, those sections keep their Last updated line. |
| 2026-11-19 | all | Moved to the documentation site: this page holds the sections mail-overview, mail-settings, mail-queue, mail-test, mail-templates, mail-troubleshooting of the former E-mail settings document. Page frame, headings and links between the pages updated; the text of the sections is unchanged. |
| 2026-11-19 | mail-overview, mail-settings | References to the tabs of the former single-page document replaced by links to the sections they meant; wording only. |
| 2026-11-20 | mail-queue, mail-templates, change-log | Checked against 75f021e0. Send at once or queue: the Forgot password code mail leaves after the answer when the queue is off (under Apache with mod_php switch the queue on). Mail templates: Verify email, Forgot password, Welcome with verification code and Two-factor verify email end with "The verification code will expire in [code_minutes] minutes." (6 minutes); an updated site gets this text only where a template still holds the 1.0.0 default. Both sections re-checked against 75f021e0: nothing else in them changed. |
| 2026-11-20 | mail-queue, mail-templates, change-log | Checked against fd836817: nothing in these sections changed. |
| 2026-11-21 | mail-overview, mail-settings, mail-troubleshooting, change-log | Checked against b2a18572. The unsubscribe link opens a confirm page of the site (Unsubscribe from emails, the button Unsubscribe, its messages); opening the link alone changes nothing; links of mails sent before 1.1.0 are no longer valid; no AdminCP screen for the list. The account mails that are always sent, also to an unsubscribed address, by template name, without the unsubscribe line; mail to the site's own address is never held back. Every mail is written in the recipient's language, its greeting included. The contact mail answers to the visitor (Reply-To). Enable email Log never writes a password or a code. The mail log keeps one file a month, the last 2. |
| 2026-11-25 | all | Re-checked against e94aef78, the code of the 1.1.0 release: every section compared with the code changes since it was last checked; the sections whose code changed since then carry today's date. |