Answered: Q2A running in Docker hosted on AWS. How can I send mail to users?

Post date: 2022-06-28 18:58:27
Views: 13

You don't need to expose ports on the container for sending mail. However, because the container is most likely on an isolated network on the host system you need something to relay mail through. The top answer to the Stack Overflow question @GateOverflow linked to uses an MTA (Mail Transfer Agent, vulgo mail server) on the host for that purpose.

Since your Q2A instance seems to be configured for using local mail (checkbox "Send email via SMTP instead of local mail" under Admin ? Emails left unchecked, which is the default setting) you also need some kind of null mailer inside the container. The top answer to the Stack Overflow question uses SSMTP for that purpose, but other software can be used as well, for example nullmailer or even a full MTA like Postfix with a null client configuration.

The mail flow then goes from Q2A to the null mailer and from there to the host MTA, which will (attempt to) deliver the mail to the recipient's mail server(s).

Note that the host MTA may need to be set up to relay through another MTA if your hosting provider is blocking outbound connections to port 25 (many providers do this for spam prevention).

For further troubleshooting please check e-mail-related logs of both container and host.

Please click Here to read the full story.
Other Top and Latest Questions:
How to approve all users in once ?
What to do with extraneous wiring in bathroom fixtures?
What does REALLY wanting kids feel like?
Finding good movies on Netflix and Amazon Prime etc.
I'm glad that you're sorry now
Movie: Serial Mom
The Sandman: The Sound of Her Wings (Books Included)
Movie: Bodies Bodies Bodies
Movie: K.G.F: Chapter 1
Movie: Up