0

I use PHP to send mail on Fedora 36.

mail($email, $betreff, $content, $header);

However the mail does not arrive. What could be the problem?

Dennis
  • 11
  • 2

1 Answers1

0

Check if php successfully transfers responsibility for email delivery.

if (mail($to, $subject, $message,  $headers)) {
    echo 'email was sent.';
} else {
    echo 'An error occurred.';
}

On Linux/Unix php by default sends emails via local MTA/SMTP server.
Check/report which MTA is installed on your system (postfix/sendmail/exim/…).

AnFi
  • 6,103
  • 1
  • 14
  • 27