Unify mail related tests for *nix and Windows

  107261
September 20, 2019 10:02 cmbecker69@gmx.de ("Christoph M. Becker")
Hi all!

Currently our mail related tests (in ext/standard/tests/mail/ and maybe
other locations) are split for *nix and Windows (if there are even
Windows versions).  The basic difference is that the *nix variants set
the INI directive sendmail_path to just write the email to disk (some
variations exist), while the Windows tests use ext/imap.  The latter
tests are way more verbose, and such duplicated tests are generally a
pain point.

Therefore I suggest to unify these tests.  Basically, setting the
sendmail_path works for Windows as well; we only have to offer a binary
that writes the mail to disk (`tee` and non-binaries don't appear to
work).  A rudimentary implementation is trivial[1].

The then missing part would be to actually make the ini setting
portable, which might be done by introducing a new placeholder for PHPT
INI sections, similar to {TMP} and {PWD}.  The new placeholder would
likely have to accept a filename, so it could be something like
{MAIL:}.

Any ideas and suggestions for improvements, or potential caveats welcome!

[1] <https://gist.github.com/cmb69/40c8c3f40795d9032aec49d13e452fa5>

--
Christoph M. Becker