Tags: howto, administrator, email

Configure Email for Server-Side Scripts#

This guide shows how to configure LinkAhead to send emails from server-side scripts. Email sending is handled by the pylinkahead send_email function, which reads its settings from the [Email] section of caosdb-server/scripting/home/pylinkahead.ini.

Prerequisites#

  • Server-side scripting is configured and working. See the server-side scripting documentation.

  • Your institution’s SMTP server is reachable from the LinkAhead host, and you have the hostname, port, and credentials for it.

Steps#

Add an [Email] section to caosdb-server/scripting/home/pylinkahead.ini. Port 587 with STARTTLS is the most common setup for institutional SMTP servers:

[Email]
smtp_server=smtp.example.com
smtp_port=587
smtp_starttls=yes
smtp_username=your_username
smtp_password=your_password
from_address=LinkAhead <linkahead@example.com>
bcc_append=admin@example.com

If your server requires implicit TLS (port 465) instead of STARTTLS, replace smtp_starttls=yes with smtp_tls=yes and set smtp_port=465.

For the full list of supported options, see the send_email API documentation.