New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/vleedev/smtp-relay-rabbitmq

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/vleedev/smtp-relay-rabbitmq

  • v0.0.0-20210110054945-de18314c11fe
  • Source
  • Go
  • Socket score

Version published
Created
Source

CI

Description

This app is used to listen to a queue of rabbitmq and send an email via SMTP connection

Using

Use container image vleedev/smtp-relay-rabbitmq:latest

Set environment variables

RABBITMQ_URL: your rabbitmq url service
QUEUE_NAME: a queue name to listen on that service
SMTP_HOSTNAME: smtp host
SMTP_PORT: smtp port
SMTP_USERNAME: smtp username
SMTP_PASSWORD: smtp password
SMTP_DEFAULT_EMAIL: default email if sender is not set

Docker-compose example

version: '3.7'
services:
    smtp-relay-rabbitmq:
        image: vleedev/smtp-relay-rabbitmq:latest
        environment:
            RABBITMQ_URL: amqps://wrfizrrb:Fz3wHpwrwLL39J31ekLR8kR_bBT0s8ruv@cougar.rmq.cloudamqp.com/wrfizrrb
            QUEUE_NAME: my_project_app_email_queue
            SMTP_HOSTNAME: email-smtp.us-west-2.amazonaws.com
            SMTP_PORT: 587
            SMTP_USERNAME: AKIATXPJWI7G5O3LIAFX
            SMTP_PASSWORD: BNP9c2nm8taH7dpaZUXLpM7MP0OO6vQlSjfRX1Yk43vb
            SMTP_DEFAULT_EMAIL: me@vlee.dev

Test service by publishing your contents to queue

You must prepare your data by encoding json structure as below

{
    "from": "me@vlee.dev",
    "to": [
        "admin@google.com",
        "ad@facebook.com"
    ],
    "subject": "My subject",
    "body_type": "text/html",
    "body": "<html><body><p>This one is a test email from smtp-relay-rabbitmq</p></body></html>",
    "attachment": [
        "https://i.imgur.com/UbUQWHO.jpeg"
    ]
}

Note: publish to your queue with content-type = application/json

Sign up a cloud amqp queue

Website: https://www.cloudamqp.com/

Code Boilerplate

Look for your favourite language and implement it https://www.rabbitmq.com/getstarted.html

FAQs

Package last updated on 10 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc