> For the complete documentation index, see [llms.txt](https://documentation.opencats.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.opencats.org/how-tos/reminder-emails.md).

# Emails & reminders

OpenCATS can send email through PHP mail, Sendmail, or SMTP. Calendar reminders require both email configuration and a scheduled job that invokes `QueueCLI.php`.

## Configure email

Email settings live in `config.php`.

`MAIL_MAILER` selects the delivery method:

* `0` - disabled
* `1` - PHP built-in mail support
* `2` - Sendmail
* `3` - SMTP

Common SMTP settings are:

```php
define('MAIL_MAILER', 3);
define('MAIL_SMTP_HOST', 'smtp.example.org');
define('MAIL_SMTP_PORT', 587);
define('MAIL_SMTP_AUTH', true);
define('MAIL_SMTP_USER', 'user@example.org');
define('MAIL_SMTP_PASS', 'strong-password');
define('MAIL_SMTP_SECURE', 'tls');
```

For Sendmail, configure:

```php
define('MAIL_MAILER', 2);
define('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail');
```

Do not commit real SMTP passwords to public repositories.

## Scheduled email reminders

OpenCATS sends calendar event reminders when `QueueCLI.php` is run by cron or another scheduler. A typical Linux cron entry runs every minute:

```cron
* * * * * /usr/bin/php /var/www/html/opencats/QueueCLI.php >/dev/null 2>&1
```

Use the correct PHP binary and OpenCATS path for your server.

A URL-based scheduler can also call the script, but local CLI execution is preferred when available:

```cron
* * * * * curl -fsS http://example.org/QueueCLI.php >/dev/null 2>&1
```

## Reminder template

The event reminder email template is configured in `config.php` as `$GLOBALS['eventReminderEmail']`. Back up `config.php` before changing the template.

## SMTP certificate problems

If you see certificate verification errors from PHPMailer, fix the server trust store or SMTP configuration where possible. Disabling certificate verification weakens security and should only be used as a temporary troubleshooting step.

PHPMailer troubleshooting documentation is available at:

<https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#certificate-verification-failure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.opencats.org/how-tos/reminder-emails.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
