Blog-Core framework

Fork me on GitHub

Mail notifications

There are 3 types of built-in mail notifications:

  • New comment notification sent to article author.
  • New reply notification to the original comment author.
  • New mention (@Someone) notification to the mentioned commenter.

In order to enable mail notifications:

  • Email setup (SMTP configuration) must be done using the Email button in the main menu.
  • Site base URL in the Config button in the main menu must be set up. This is used for both article links and unsubscribe links.
  • Entry canonical link path must be set for the entry type.
  • Application must be run in production mode. Otherwise mail is not actually sent out.

For reply mails:

  • Receiver must have notifications enabled (sent notify: true) in the original comment.
  • Receiver must have email set in the original comment.

For mention notifications:

  • Receiver must have notifications enabled (sent notify: true) in the last comment on the entry.
  • Receiver must have email set in the original comment.

To register canonical link path:

:- use_module(library(bc/bc_type)).
:- bc_register_canonical(post, '/post/<slug>').

To enable mail sending in development:

:- use_module(library(bc/bc_mail_queue)).
:- bc_mail_set_behavior(send).