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.

Step 1. Create a Google app password

An App Password permits a non-Google app to access Google's SMTP server. App Passwords can only be used with accounts that have 2-step verification turned on. Google recommends using "Sign in with Google" whenever possible, a more secure way to connect apps. Here, we must create an app password for GMail to work with Koha ILS. Create a dedicated Gmail account or GMail-based email service for Koha. Don't use an existing email for other purposes when SMTP is configured; the inbox will be filled with bounced emails. 

1. Visit the Google Account Security settings page and turn on 2-step verification. Here is the link to your Google Account Security Settings, https://myaccount.google.com/u/2/security.


2. Scroll to the bottom of the page and find the app password section. Click on App passwords. Give the app name; for example, Mail. Click on the Create button.

3. Copy the app password and save it in a place for future reference.

Step 2. SMTP configuration

Open Administration > Additional parameters > SMTP servers > New SMTP Server.
Add the details.
Name: Give server name, e.g. MGU Mail
Host: Enter the server's hostname. Here, the Gmail SMTP hostname is smtp.gmail.com
Port: Enter the port number of Gmail SMTP, 587. 
Timeout (seconds): Enter the number of seconds after which an unsent email will result in an error
SSL: Choose the security protocol. STARTTLS works with Gmail.
Username: Enter the Gmail ID. 
Password: Enter the Google App Password.
Debug mode: Select debug mode to send additional output to the logs.
Default server: Select it if all libraries use the default server.

Click the ‘Submit’ button to save the configuration.

Step 3. Enable email messaging in Koha

1. Apply the following command in a Terminal to enable email services from Koha ILS.

sudo koha-email-enable library

Other configurations to prepare Koha to send email messages.

1. Enable Enhanced Messaging preferences.

Koha Administration > Global System Preferences > Patrons > Enhancedmessagingpreferences > Allow

2. Visit each patron category at Administration > Patron categories and change the configuration, Overdue notice required (Yes).

3. Overdue Notice/Status triggers

Koha >  Tools > Overdue Notice/status triggers

No comments:

Post a Comment