I'm working on a local dockerised setup and I have medusa backend running and workon ports 7001, 8000 etc. I also have mailhog, redis and postgres images. All is good. But the emails are not going out.
I created a node image for node like this
FROM node:18-buster-slim
# Install system requirements
# Use non-interactive frontend for debconf
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Install system requirements
RUN apt-get update && \
apt-get install -y --no-install-recommends git python wget && \
rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 --no-check-certificate
RUN chmod +x mhsendmail_linux_amd64
RUN mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail
# Set the default directory where CMD will execute
WORKDIR /app
# Set the default command to execute when creating a new container
COPY scripts/node-dev-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh", "--"]
CMD bash
And I have smtp plugin set up like this:
{
resolve: `medusa-plugin-smtp`,
transport: {
sendmail: true,
path: "/usr/local/bin/mhsendmail",
newline: "unix",
},
options:{
fromEmail: "noreply@medusajs.com",
host: "mailhog",
port: 1025,
secureConnection: false,
auth: {
user: "",
pass: "",
},
}
},
I see medusa-backend-1 | info: Processing user.password_reset which has 1 subscribers in my shell, but what i Do not see is email going out. **How can I debug this? ** I tried with default sendmail but that worked just as little as with mhsendmail. Help please.