Commit graph

26 commits

Author SHA1 Message Date
Sergey Minkov 3babd9020e
parse cc and bcc from custom headers to add them on email envelope (#1865) 2024-05-18 17:49:24 +05:30
Kailash Nadh 7c44eb02a4 Replace Go easyjson lib. 2024-01-27 20:59:24 +05:30
Joe Paul be62c50b3c
feat: Add from_email to postback struct for sending tx postbacks (#1623) 2023-12-11 21:53:30 +05:30
guangwu 4577868567
chore: remove refs to deprecated io/ioutil (#1593)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-11-16 13:57:00 +05:30
Robert R George c911aeb20e
Fix attachments being omitted from postback (#1557) 2023-10-14 02:06:42 +05:30
Kailash Nadh 917696a543 Refactor Messenger interface.
Remove `messenger.go` and move the interface definition to `manager`
and the `Message` struct to the `models` package, removing superflous
and redundant message structs used in multiple places.
2023-05-08 22:43:25 +05:30
Kailash Nadh 74322cda36 Fix e-mail From/Return-Path envelope sender. Closes #908, closes #1008. 2022-11-10 00:01:24 +05:30
Kailash Nadh c3d04a5490 Refactor models.SubscriberAttribs JSON wrapper to generic name JSON. 2022-10-02 22:53:38 +05:30
Joe Paul 175770d8b8 fix: Use list append instead of indexing 2022-06-27 16:14:46 +05:30
Joe Paul a1df02b41c feat(postback): Add attachment, from email to postback body 2022-06-27 15:47:38 +05:30
Gokul Menon 04c4552a9c Fixed typos 2022-02-28 14:19:50 +01:00
Kailash Nadh 583dab4bc6 Add support for per-campaign custom headers.
- Add new `headers[]` column to the campain table.
- Add new headers box to the campaign UI that takes a JSON array of
  custom headers like the headers on the SMTP settings UI.
- Headers are added to e-mails and messenger postback webhooks.
- Add cypress tests.

Closes #514.
2022-01-04 22:27:40 +05:30
Kailash Nadh dd061f56d4 Add support for direct SSL/TLS (non-STARTTLS) SMTP connections.
- Add support for TLS in `smtppool` (v0.4.0) and upgrade the lib.
- Change `tls_enabled: bool` in the settings table to string
  `tls_type: STARTTLS|TLS|none` and on the settings UI.
- Add DB migrations and schema changes to apply the field change.

Closes #504.
2022-01-03 19:28:36 +05:30
Kailash Nadh 68afd61024 Add support for alternate plaintext body for e-mails.
This commit removes the Go html2text lib that would automatically
convert all HTML messages to plaintext and add them as the alt
text body to outgoing e-mails. This lib also had memory leak
issues with certain kinds of HTML templates.

A new UI field for optionally adding an alt plaintext body to
a campaign is added. On enabling, it converts the HTML message in
the campaign editor into plaintext (using the textversionjs lib).

This introduces breaking changes in the campaigns table schema,
model, and template compilation.
2021-01-30 18:49:47 +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 8c0804ba9f Refactor blacklist to blocklist 2020-08-01 16:45:29 +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 7a467a5a3b Add support for custom e-mail headers per SMTP server 2020-05-31 21:16:56 +05:30
Kailash Nadh 18329ff052 Add TLS to SMTP config 2020-05-17 21:07:48 +05:30
Kailash Nadh abddcb9a03 Remove redundant SMTP LOGIN auth implementation 2020-05-16 23:38:19 +05:30
Kailash Nadh 9d3ca357f6 Integrate new SMTP pool lib 2020-05-16 23:25:37 +05:30
Kailash Nadh e58b2fa669 Fix typo 2020-05-11 21:00:06 +05:30
jaredfolkins 11c7c60455 enhc: add plain text email body along with HTML, add option in
config.toml
2020-04-14 11:19:34 -07:00
Kailash Nadh 9dcd716f91 Add support for SMTP 'LOGIN' auth 2020-04-01 19:56:40 +05:30
Kailash Nadh 9005bb6dad Move internal packages to 'internal' dir 2020-03-08 00:17:54 +05:30