Commit Graph

18 Commits

Author SHA1 Message Date
Kailash Nadh ee4fb7182f Refactor i18n name and fix the L() function in public HTML templates 2021-01-23 19:34:30 +05:30
Kailash Nadh a0b36bb01b Log subscriber UUID in message send errors 2020-10-24 14:24:22 +05:30
Kailash Nadh 1b279478fb Make individual subscriber tracking optional.
A new toggle switch in Settings -> Privacy, which is off by
default, allows campaign views (pixel) and link clicks to function
without registering the subscriber ID against view and click
events, anonymising tracking. When off, the subscriber UUIDs in
view and link tracking URLs are removed, anonymising subscriber
information from HTTP logs as well.
2020-10-18 17:49:46 +05:30
Kailash Nadh 6cf43ea674 Add generic HTTP postback `Messenger` support.
This is a major feature that builds upon the `Messenger` interface
that has been in listmonk since its inception (with SMTP as the only
messenger). This commit introduces a new Messenger implementation, an
HTTP "postback", that can post campaign messages as a standard JSON
payload to arbitrary HTTP servers. These servers can in turn push them
to FCM, SMS, or any or any such upstream, enabling listmonk to be a
generic campaign messenger for any type of communication, not just
e-mails.

Postback HTTP endpoints can be defined in settings and they can be
selected on campaigns.
2020-10-10 18:52:08 +05:30
Kailash Nadh ec097909db Add support for `List-Unsubscribe` header.
- Added as a setting in the settings UI.
- Refactor Messenger.Push() method to accept messenger.Message{}
  instead of a growing number of positional arguments.
2020-08-01 17:54:51 +05:30
Kailash Nadh 942eb7c3d8 Add settings UI and "hot reload" support to the app.
This is a major breaking change that moves away from having the
entire app configuration in external TOML files to settings being
in the database with a UI to update them dynamically.

The app loads all config into memory (app settings, SMTP conf)
on boot. "Hot" replacing them is complex and it's a fair tradeoff
to instead just restart the application as it is practically
instant.

A new `settings` table stores arbitrary string keys with a JSONB
value field which happens to support arbitrary types. After every
settings update, the app gracefully releases all resources
(HTTP server, DB pool, SMTP pool etc.) and restarts itself,
occupying the same PID. If there are any running campaigns, the
auto-restart doesn't happen and the user is prompted to invoke
it manually with a one-click button once all running campaigns
have been paused.
2020-07-21 00:23:57 +05:30
Kailash Nadh c2613d1030 Fix ticker leak in campaign manager message push 2020-07-06 20:29:19 +05:30
Kailash Nadh fd044f4cb6 Minor refactor to campaign manager.
- Remove external invocation of worker goroutines into Run()
- Split Run() into smaller functions.
2020-07-06 20:22:57 +05:30
Kailash Nadh 79dd916d09 Make DB pull batch size in campaign manager configurable 2020-07-05 19:48:39 +05:30
Kailash Nadh 64d44707c2 Add {{ templating }} support to e-mail subjects 2020-07-05 18:39:24 +05:30
Kailash Nadh f498cddc7a Add support for hosted messages and `{{ MessageURL }}` tpl tag. 2020-04-26 15:51:43 +05:30
Kailash Nadh 6bba55f0eb Remove 'campaignDone?' check that incorrectly ignored queued
messages in a finishing campaign.
2020-04-25 15:54:25 +05:30
Kailash Nadh 894ede561a Add support for message throughput rate limiting 2020-04-02 18:22:27 +05:30
Kailash Nadh ca032c89d6 Refactor manager.CampaignMessage's exposed fields 2020-03-08 15:02:20 +05:30
Kailash Nadh d4aea0a436 Add support for pushing non-campaign message with workers.
- Refactor campaign.Message into campaign.Message and
  campaign.CampaignMessage
- Remove ad-hoc goroutines (flawed approach) that were used to push
  admin and optin notifications.
- Provision for largscale pushing of ad-hoc, non-campaign messages
  such as transactional messages (in the future).
2020-03-08 12:27:41 +05:30
Kailash Nadh 5f6a4af6b4 Cleanup unnecessary pointers 2020-03-08 11:07:24 +05:30
Kailash Nadh 40ae9cdb31 Minor formatting fixes 2020-03-08 10:54:10 +05:30
Kailash Nadh 9005bb6dad Move internal packages to 'internal' dir 2020-03-08 00:17:54 +05:30