Showing posts with label email. Show all posts
Showing posts with label email. Show all posts

Configure SMTP server to send emails through Koha

Now, it's easy to configure an SMTP-based email account for Koha and send emails for various occasions. Koha provides a GUI for SMTP server configuration. Forget about cumbersome email server configuration using Exim and Postfix. Here are the steps to configure the SMTP server using Gmail. Gmail is accessible for most of the users. Other SMTP-based email users can directly go to Step 2 for configuration. The process involves two steps; creating an app password for a Google account and adding the server details to the Koha ILS.

Email sending limits in Gmail: Reasons to hire a transactional email service

Many libraries started to use SMTP-based email services in Koha. Koha provides SMTP server configuration from Administration > SMTP servers > New SMTP server. Such libraries use Gmail free account as the email service provider. Gmail allow you to send 100 emails per day. Users can't send new messages for up to 24 hours if the number of messages exceeds the limit. Google says, "If a user exceeds their sending limits, their account might be suspended". Another drawback of using an ordinary Gmail account is that libraries can't add their domain to the email ID. Sending emails from an ordinary Gmail account is a non-professional approach.

What's the solution?

Libraries can use a dedicated email service to deliver emails. Hiring an SMTP email service to work with Koha is a good idea. Libraries can choose email services from an array of service providers. Such services enable sending, receiving, and tracking emails. Netcore, MailGun, and Mailchimp are examples of transactional email service providers. Libraries can subscribe to the plan based on the number of transactions per day. Email services give the SMTP server settings details to configure with Koha.

Send messages in queue immediately

Koha user can send messages in queue due to various reasons. Certain messages in Koha set to send in midnight. Often libraries running Koha on desktop machine shut down PC after working hours. In this situation, messages can't send. If you are also hurry to send messages generated at once, apply following commands:

1. Load environmental variables

sudo su
export PERL5LIB="/usr/share/koha/lib" 
export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"

2. Push messages in queue

cd /usr/share/koha/bin/cronjobs
./process_message_queue.pl

Warning: When executing the process_message_queue.pl, the library personnel should ensure that no one is trying to check in / out items.

Configure Exim with Gmail to send notices from Koha

Exim is a Mail Transfer Agent suitable (MTA) with Linux operating systems. Koha user can install Exim to send email notices to library users. Exim can be used instead of Postfix.

An email from Koha.

Use of borrowers-force-messaging-defaults script

This script create messaging preferences for all existing borrowers and sets them to default values defined for the category they belong to. Otherwise staff user has to modify the messaging preferences of each patron one by one. Follow the instructions to run the borrowers-force-messaging-defaults script.

Load environment variables

sudo su
export PERL5LIB="/usr/share/koha/lib"
export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"

Run borrowers-force-messaging-defaults script.

cd /usr/share/koha/bin/maintenance
perl borrowers-force-messaging-defaults.pl --doit

Customize email notices

Koha has the option to send email notices to users in various occasions like over due, Check-in, check-out, renewal etc. Sample notices are available with Koha. Library staff can customize the subject line and content of the emails.

First of all a mail server need to install and add email credentials. Check the tutorial on How to configure Gmail with Postfix.

Here is a customized notice from my library.


Customize email notices
Sample messages can be find at Tools > Notices&Slips
Let see how can we customize a notice send from Koha when a user check out book. 


Click on Edit button against the CHECKOUT notice.

How to solve email sending problem with Postfix and Gmail

This post is obsoleted due to Google turning off less secure app access to G Suite accounts.
Turning off less secure app access to G Suite accounts

Use the following link to create Gmail password for email clients (e.g. Exim, Postfix).
Sign in using App Passwords