Hosting
Setting up e-mail: SMTP or sendmail
Connect Qorekit to an SMTP server or the server's sendmail, send a test email, and make sure the mail queue keeps moving with cron.
This is part of Qorekit 0.3, out now as a beta: download 0.3.0-beta.1. As with any beta, keep a backup of anything you cannot afford to lose.
Qorekit 0.3 sends email. Invitations, password links and notifications reach people in their inbox once you tell Qorekit how to send. This post shows how to set it up on ordinary hosting, test it and keep it working.
Until email is set up, those messages reach nobody. Administration › Email says so at the top of the page, so you know where you stand.
What Qorekit sends
Qorekit sends email for:
- invitations for new users, with a link to choose a password;
- links for a forgotten password;
- notifications by email, for people who want them.
Choosing how to send
Open Administration › Email. Only administrators see this page. Send email through offers two ways.
SMTP server is the most reliable. Your hosting provider or email service gives you a server name, a port and an account to send with. Most use port 587 with STARTTLS. Some use port 465 with SSL/TLS.
The server’s sendmail uses the mail program of the server Qorekit runs on. Many hosts allow it, and it needs no account. Its messages more often end up in spam folders, though.
If you have a choice, use SMTP.
Setting up SMTP
- Choose SMTP server under Send email through.
- Enter the server, the port and the encryption your provider gives.
- Enter the account’s user name and password.
- Set the sender address and, if you like, the sender name.
- Save.
The password is stored encrypted with the application key and never shown again. When you come back to the page, leave the password field empty to keep it.
The sender
The sender address is what people see the email come from. Use an address at your own domain that the SMTP account may send from, such as crm@example.com. Many servers refuse other addresses, and receivers trust them less.
If you leave it empty, Qorekit uses the address in the server’s environment file, or no-reply@ your domain.
The sender name is your installation’s name unless you give another. Your colleagues then see a name they know, such as Acme CRM, in their inbox.
Sending a test email
Before relying on it, test it.
- Choose Send test email.
- Leave your own address, or enter another.
The message goes out at once, with the settings on the page, whether you saved them or not. You can try a different port or encryption without saving first.
If the message cannot be sent, the page shows the mail server’s answer, such as a wrong password or a refused connection. It tells you which setting to look at.
If it was sent, check that the message arrived. Look in the spam folder too.
Settings in the environment file
Some hosts set up email in the server’s environment file, with MAIL_MAILER and related values. Qorekit uses those until you save settings in Administration › Email. After that, the page’s settings count.
How email goes out
Messages wait in a queue in the database. The one someone is waiting for, such as a password link, goes out right after they ask for it.
Anything that could not be sent is tried again a few times by scheduled work. A short outage of the mail server loses nothing.
Scheduled work needs a cron job that runs Qorekit every minute. Administration › System shows the exact command for your installation, ready to copy into your hosting panel’s cron settings. Without it, retries and notification emails wait.
Watching the queue
Administration › Email lists the messages still waiting, and the last ones that failed after every attempt, with the reason.
- Many waiting messages usually mean that scheduled work does not run. Check the cron job on the System page.
- Failed messages come with the reason they could not be sent.
Read more
The documentation has the details on email and on scheduled work, with steps for common hosting panels. Email arrives with Qorekit 0.3.0.