0

I have a docker container built from this dockerfile:

FROM php:8.2-apache
RUN a2enmod rewrite
RUN a2enmod include

ENV PORT=80

I want to send an e-mail from php using it's mail() function.
What do I have to set up?
Does sendmail/PHPmailer do what I want? And if it does, how do I install and configure it?

I'm on a Windows 11 host in case this matters.

Kinglui11
  • 56
  • 6
  • 1
    Does this answer your question? [Configure sendmail inside a docker container](https://stackoverflow.com/questions/26215021/configure-sendmail-inside-a-docker-container) – Nico Haase Dec 19 '22 at 15:57
  • 2
    Also, using PHP's `mail()` directly will cause tons of trouble. Use a proper library to handle mails (like SwiftMailer, PHPMailer, Symfony's Mailer) – Nico Haase Dec 19 '22 at 15:57
  • "Does sendmail/PHPmailer do what I want?" - even if these are two completely different things: yes, they might work – Nico Haase Dec 19 '22 at 16:10

0 Answers0