Bug #18701
closedProblems with PHP mail function on Windows
0%
Description
The implementation of the mail function in PHP differs on Windows.
Emails containing to and from email adresses formatted like:
John Doe <john@example.com>
ill result in the email not being sent on Windows.
This can be fixed quite easily as shown in the patch.
http://www.php.net/manual/en/function.mail.php
(issue imported from #M8255)
Files
Updated by Martin Kutschker over 16 years ago
The docs say only that the name may not be used in the "to" argument of the mail() function. It is not clear why the valid headers for From: and Reply-To: don't work for you.
I assume your patch comes from experience?
Updated by Andreas Otto † over 16 years ago
Yes, the patch comes from experience.
Some of our clients run TYPO3 on Windows servers and all installations have the same problem.
I have added a small test script which tries to send an email two times and shows the results TRUE and FALSE.
Please replace the email address with a valid address.
Updated by Dmitry Dulepov over 16 years ago
I attach a different solution (8255_alt_v1.diff), which fixes also the problem with mini_sendmail. It takes care about t3lib_div::plainMailEncoded().
To test the patch use user_sendmail.php. Put it to fileadmin/ and use the following TS on a dedicated page:
includeLibs.user_sendmail = fileadmin/user_sendmail.php page > page = PAGE page.typeNum = 0 page.10 = USER_INT page.10.userFunc = user_sendmail
Make sure you change e-mail addresses in this script.
Updated by Dmitry Dulepov over 16 years ago
Attached newever version that fixes some more mail problems in the same files
Updated by Michael Stucki over 16 years ago
Hi Dmitry,
can you please separate the " => ' transformations from the functional changes? Makes it easier to review...
Additionally: What is the reason for writing "This is a multi-part message in MIME format" twice in a row?
- michael
Updated by Dmitry Dulepov over 16 years ago
Sorry, Michael. I already put lots of time into this patch. I am not willing to spend extra hour to separate space related changes.