This app is used to listen to a queue of rabbitmq and send an email via SMTP connection
10K+
This app is used to listen to a queue of rabbitmq and send an email via SMTP connection
Use container image vleedev/smtp-relay-rabbitmq:latest
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
version: '3.7'
services:
smtp-relay-rabbitmq:
image: vleedev/smtp-relay-rabbitmq:latest
environment:
RABBITMQ_URL: amqps://wrfizrrb:[email protected]/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: [email protected]
You must prepare your data by encoding json structure as below
{
"from": "[email protected]",
"to": [
"[email protected]",
"[email protected]"
],
"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
Website: https://www.cloudamqp.com/
Look for your favourite language and implement it https://www.rabbitmq.com/getstarted.html
Content type
Image
Digest
Size
10.8 MB
Last updated
over 5 years ago
docker pull vleedev/smtp-relay-rabbitmq