Care Core

Documentation › Running it › Email

Email

Switching on invitations and password links by email, testing it, and what is sent.

Care Core can email the few things a login needs. It is optional: without it everything still works, with links shown on screen instead.

What is emailed

MessageWhenTo
InvitationA login is created, or an administrator chooses New invitation.The person the login is for. The link works once and lasts 7 days.
Password linkSomeone uses Forgotten your password? on the sign-in page.That address, only if it has a login that signs in with a password. The link works once and lasts 1 hour.
Password changedA password is changed, from the account page or from a password link.The owner of the login, so a change they did not make is noticed.
Test messageAn administrator presses Send me a test message.That administrator.

Nothing else is emailed: no reminders, no newsletters, nothing about the people you support. See What it does not do yet.

Switching it on

Whoever hosts Care Core adds the mail server's details to the .env settings file (see Installing). Use a mailbox on your own domain, made for this purpose, so that replies and limits are kept apart from anyone's personal mail.

SettingMeaning
SMTP_HOSTThe mail server, for example smtp.example.com. Email is off while this is empty.
SMTP_PORT, SMTP_SECURE465 with ssl, or 587 with tls.
SMTP_USER, SMTP_PASSThe mailbox's sign-in. Kept only in the settings file.
MAIL_FROM, MAIL_FROM_NAMEThe address and name messages come from. The address defaults to SMTP_USER; the name to “Care Core”.

Then test it from the server, which prints the mail server's answer:

php scripts/test-email.php you@example.org

or sign in as an administrator and press Send me a test message on Admin › Email.

The demonstration never sends email. Its people are invented, so invitation links are shown on screen there whatever the settings say.

Checking what was sent

Admin › Email lists the newest 50 messages for your organisation: when, to whom, what kind, and whether the mail server accepted it. If it refused, the reason is shown. The message itself, and the link inside it, are never kept.

Accepted is not the same as delivered. Care Core knows the mail server took the message. It cannot know whether it reached the inbox or went to junk. If people say messages are missing, ask them to look in junk, and ask whoever manages your domain to check its SPF, DKIM and DMARC records.

If an email cannot be sent

When the mail server refuses an invitation, Care Core shows the link on screen instead, so the administrator can pass it on and nobody is left waiting. A forgotten-password link that cannot be sent is recorded on Admin › Email; the person can ask again, or an administrator can choose New invitation.

Limits that protect people

  • One address can ask for a password link 3 times an hour, and one place 10 times an hour. Beyond that nothing is sent, and the page says the same as always.
  • Asking for a link changes nothing. The current password keeps working until the link is used.
  • The page never says whether an address has a login.
  • Logins that sign in with Microsoft, logins still waiting for their invitation, and disabled logins are never sent a password link.