Git Product home page Git Product logo

listmonk-messenger's Introduction

listmonk-messenger

Lightweight HTTP server to handle webhooks from listmonk and forward it to different messengers.

Supported messengers

  • Pinpoint
  • Twilio
  • AWS SES - Use listmonk >= v2.2.0

Development

  • Build binary
make build
  • Change config.toml and tweak messenger config

Run the binary which starts a server on :8082

./listmonk-messenger.bin --config config.toml --msgr pinpoint --msgr ses
  • Setting up webhooks

  • Add messenger specific subscriber atrributes in listmonk

  • Add plain text template

  • Change campaign messenger

listmonk-messenger's People

Contributors

allan-nava avatar danquack avatar dependabot[bot] avatar joeirimpan avatar pucilpet avatar rrgeorge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

listmonk-messenger's Issues

404 Page Not Found Error When Accessing listmonk-messenger on Port 8082

Hello everyone,
I've tried to install listmonk-messenger, but I can't get it to run.

# ./listmonk-messenger.bin --config config.toml --msgr ses
2023/09/05 09:19:11 reading config: config.toml
2023/09/05 09:19:11 loaded ses
2023/09/05 09:19:11 main.go:134: starting on 0.0.0.0:8082

If I try to access the address on port 8082 via a browser, I get the error 404 page not found.

What am I doing wrong?

What is the purpose of this? SES API vs SMTP endpoint of SES

Someone from Amazon told me:

It looks like you can use listmonk-messenger to interface with the SES API instead of using the SMTP endpoint of SES. Might be worth looking into. See https://github.com/joeirimpan/listmonk-messenger

Why would I want to do that?

EDIT: I found this https://stackoverflow.com/questions/30721611/amazon-simple-email-service-ses-should-i-use-smtp-interface-or-ses-api. Sounds like it's not worth the hassle of learning and setting up something new.

Transactional Emails have nil pointer

POST /api/tx
{
      "subscriber_email": "[email protected]",
      "template_id": 8,
      "content_type": "html",
      "messenger": "ses",
      "from_email": "[email protected]"
  }
2023/12/03 21:55:22 http: panic serving 10.0.2.3:52728: runtime error: invalid memory address or nil pointer dereference
goroutine 44 [running]:
net/http.(*conn).serve.func1()
	/usr/local/go/src/net/http/server.go:1825 +0xbf
panic({0x9864e0, 0x101e370})
	/usr/local/go/src/runtime/panic.go:844 +0x258
github.com/joeirimpan/listmonk-messenger/messenger.sesMessenger.Push({{{_, _}, {_, _}, {_, _}, _}, _, _}, {{0x0, ...}, ...})
	/app/messenger/ses.go:57 +0x1a2
main.handlePostback({0xd1b798, 0xc0005b80e0}, 0xc0001a2900)
	/app/handlers.go:128 +0xd28
net/http.HandlerFunc.ServeHTTP(...)
	/usr/local/go/src/net/http/server.go:2084
main.wrap.func1({0xd1b798, 0xc0005b80e0}, 0xc0001a2800)
	/app/handlers.go:142 +0x253
net/http.HandlerFunc.ServeHTTP(0x982f60?, {0xd1b798?, 0xc0005b80e0?}, 0xc0005a6105?)
	/usr/local/go/src/net/http/server.go:2084 +0x2f
github.com/go-chi/chi.(*Mux).routeHTTP(0xc000076ae0, {0xd1b798, 0xc0005b80e0}, 0xc0001a2800)
	/go/pkg/mod/github.com/go-chi/[email protected]+incompatible/mux.go:431 +0x1f9
net/http.HandlerFunc.ServeHTTP(0xd1ba78?, {0xd1b798?, 0xc0005b80e0?}, 0x101e190?)
	/usr/local/go/src/net/http/server.go:2084 +0x2f
github.com/go-chi/chi.(*Mux).ServeHTTP(0xc000076ae0, {0xd1b798, 0xc0005b80e0}, 0xc0001a2700)
	/go/pkg/mod/github.com/go-chi/[email protected]+incompatible/mux.go:86 +0x3c2
net/http.serverHandler.ServeHTTP({0xd1a490?}, {0xd1b798, 0xc0005b80e0}, 0xc0001a2700)
	/usr/local/go/src/net/http/server.go:2916 +0x43b
net/http.(*conn).serve(0xc00075a0a0, {0xd1bb20, 0xc0005a4750})
	/usr/local/go/src/net/http/server.go:1966 +0x5d7
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3071 +0x4db

Error sending message [SES]

Hi,
I am trying to setup SES messenger but for some reason I can't send emails.

I always get this error:

{"level":"error","message":"error sending message","ts":"2022-06-28T12:14:10.871697306Z","line":"/home/ubuntu/listmonk-messenger/handlers.go:129","p":{"err":"mail: no address"}}

I am unable to see what address I am missing.

I ran the messenger with

./listmonk-messenger.bin --config config.toml --msgr ses

config.toml

log_level="info"

[server]
address = ":8082"
read_timeout = "5s"
write_timeout = "5s"

[messenger.pinpoint]
config = '''
{
    "app_id": "",
    "access_key": "",
    "secret_key": "",
    "region": "",
    "message_type": "",
    "sender_id": ""
}
'''

[messenger.ses]
config = '''
{
    "access_key": "XXX",
    "secret_key": "XXX",
    "region": "XXX"
}
'''

Telegram

Hi! Could you provide an example for telegram messenger?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.