Windows Server 2016+IIS/FastCGI + PHP 7.4.18 or later not compatible

Created on 1 June 2022, over 2 years ago
Updated 24 March 2023, over 1 year ago

I recently upgraded PHP on a Windows Server running IIS+FastCGI to 7.4.29 (latest as of this post). Mail sending stopped and an error is shown. The non-descriptive error is "Unable to send e-mail. Contact the site administrator if the problem persists." Nothing more helpful in the error log.

I tested previous versions of PHP back to 7.4.16, which I found to be the last version that works/is compatible in this environment. I then narrowed the problem down to the mimemail module. When uninstalled mail sending works. I further narrowed the issue down to this code in mimemail.inc:

    if (!isset($headers['From']) || $headers['From'] == $default_from) {
      $headers['From'] = $from;
    }

When this is commented out sending works. Does mimemail need to alter these headers?

My guess is this somehow relates to this patch in PHP 7.4.18: https://bugs.php.net/bug.php?id=80710

This took a while to track down. I'm posting here to save some other poor dev. Best to all!

πŸ› Bug report
Status

Closed: duplicate

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States RogerRogers

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024