Project

General

Profile

Actions

Bug #18701

closed

Problems with PHP mail function on Windows

Added by Andreas Otto † over 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2008-04-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The implementation of the mail function in PHP differs on Windows.

Emails containing to and from email adresses formatted like:

John Doe <>

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

8522.diff (797 Bytes) 8522.diff Administrator Admin, 2008-04-25 16:52
mail.php (572 Bytes) mail.php Administrator Admin, 2008-04-25 17:35
8255_alt_v1.diff (6.28 KB) 8255_alt_v1.diff Administrator Admin, 2008-05-04 17:02
user_sendmail.php (644 Bytes) user_sendmail.php Administrator Admin, 2008-05-04 17:05
8255_alt_v2.diff (10.3 KB) 8255_alt_v2.diff Administrator Admin, 2008-05-25 17:38
8255_alt_v3.diff (12.2 KB) 8255_alt_v3.diff Administrator Admin, 2008-08-05 12:04
8255_alt_final.diff (12.3 KB) 8255_alt_final.diff Administrator Admin, 2008-08-05 13:24

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #19441: class.t3lib_htmlmail.php produces null headers in HTML messagesClosedOliver Hader2008-10-09

Actions
Related to TYPO3 Core - Bug #17902: t3lib_htmlmail Content-Type header errorClosed2007-12-10

Actions
Has duplicate TYPO3 Core - Bug #18667: Incorrect multiline headers in boundary parts (t3lib_htmlmail)ClosedOliver Hader2008-04-22

Actions
Actions #1

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?

Actions #2

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.

Actions #3

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.

Actions #4

Updated by Dmitry Dulepov over 16 years ago

Attached newever version that fixes some more mail problems in the same files

Actions #5

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

Actions #6

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.

Actions

Also available in: Atom PDF