Mail queue

Elephant uses a mail queue system to allow modules to send notifications, status information and publications. Each user can configure whether to receive messages from specific categories and, when available, in which period.

Module senders and user configurations


Elephant mail API

Periods

The API treats the don't want to receive these emails as a especial period, in order to remind when a user explicitly set this option. Also, categories define which periods are allowed and the default period to use when not specified. The periods are:

DONT_SEND

Do not send mails from this category.

AS_GENERATED

Send mails as they are generated by modules.

DAILY,
WEEKLY,
FORTNIGHTLY,
MONTHLY,
QUARTERLY,
EVERY_SIX_MONTHS,
YEARLY

Send a resume for this category in the specified period, in a single email.

For instance, de project activity notifications allow periods from DONT_SEND to MONTHLY, and the default period is DAILY, whilst publications allow the DONT_SEND and AS_GENERATED periods, since publications have their own scheduled senders.

User wants vs. user may want

The notifiers behavior may vary when the user hasn't specifically set a period option. User will be treated as a Participant (may want) or as an Observer (wants), depending on how module qualifies it. The following table shows how operates:

Subscription

Not set

Period set

Don't send

Wants
Participant

Don't send

Send

Don't send

May want
Observer

Send

Send

Don't send

Similar behavior applies to user's agreements. See Agreements .

To better understand the differences, lets take two examples: issue tracking and publications.

Issue tracking

Issues depend on users participation, a role sharing type of share. We know a user may want to know when an issue changes state, if he participates in this issue. The default notifier action will be try to send the notification. If the user hasn't specifically set a period option, the default category option will be used.

Publications

Publications are sent to subscribers. The notifier will send the publication to those users whom specifically have set a period option.

In all cases, when user selected DONT_SEND option for a category, no notification of this category will be sent.

Mail queue tasks

The Elephant Mail Queue API requires a task to be created for each existent period. These tasks are configured by default. The idea behind is to permit platform administrators to change things like the hour in which daily summaries are sent, the day for monthly summaries, and so forth.

Mail macros

{livelink:text-to-show:live-link}

Expands to text-to-show linked to live-link with the user auto-authenticated. Valid for a period of seven days.

{liveref:live-link}

Expands to live-link with the user auto-authenticated. Valid for a period of seven days.

{name}

Expands to the user name.

{email}

Expends to the user email. The one set as Email in contact connectors.

{friendly}

Expands to the friendly user name (using complex name).

{formal}

Expands to the formal user name (using complex name).

Images

Images aren't included in emails. Instead, images are links to the site. This means that the email client is responsible of reading them in order to be shown. Some god practices when uploading images are:

  • Do not use punctuation symbols. Due differences among site encoding, mail clients and web mail clients, some symbols may appear translated and site would not be allowed to read them.
  • Do not use spaces. It shouldn't be a problem, but it is with some mail clients. Even worst if you think newer versions may broke previous good behavior.
  • Remember, the only characters that wont get translated are simple a to z, A to Z, . (point), - (hyphen), _ (underline) and 0 to 9. (Notice that ç, Ç, ñ and Ñ are not in these ranges)

By default, files stored in publishable contexts will be transformed on uploads. The exact process do change white-spaces for hyphens and do remove any character not in the standard range. It will also try to transform punctuated vowels before removing.

Links

The recommendation for images with live links (auto-authenticated links) is:

[link({liveref:live-link})]
[img image-to-show]
[/link]

System notification queue

System queue is used to send admin notifications to site administradors, password reminders to users and more of the kind. The system queue is private, users can't change sending period. The logic used when sending is the User may want approach, which means that users will receive notifications except when explicitly set to DONT_SEND. Although administradors can set periods for this queue, it's not recommended. System notifications are better sent AS_GENERATED.

Printer version
English11/21/17 15:14Lluís Turró Cutiller
English11/22/17 14:48Lluís Turró Cutiller
English11/24/17 13:49Lluís Turró Cutiller
English07/24/18 10:26Lluís Turró Cutiller
English01/05/19 10:46Lluís Turró Cutiller
English01/06/19 11:27Lluís Turró Cutiller
English10/10/22 16:03Lluís Turró Cutiller