Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #19 Fixes #72 duplicate subject header on windows #103

Merged
merged 3 commits into from
Aug 6, 2020

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Aug 5, 2020

Signed-off-by: Abdul Malik Ikhsan [email protected]

Q A
Bugfix yes

Description

Re-create zendframework/zend-mail#225 by @arueckauer Fixes #19 #72 . Original issue description reported by @matbech :

Summary

On Windows with PHP 7, when sending an mail message with the Sendmail transport, the subject header is duplicated.

Steps to reproduce

To reproduce the bug the sample from here can be used:
http://framework.zend.com/manual/current/en/modules/zend.mail.introduction.html

The resulting mail headers look something like this:

Subject: Test Subject
Date: Wed, 29 Jul 2015 17:33:17 +0000
From: =?UTF-8?Q?test?= [email protected]
To: [email protected]
Subject: Test Subject

Cause

In the Sendmail transport all headers (including the Subject) and the subject itself are passed to the php mail function:

$result = mail($to, $subject, $message, $headers);

The mail function then appends to the $subject to the $headers. I do not think the php mail function should handle this case because it doesn't know what subject the caller intended to use. However I believe php mail should at least issue a warning (TBD: file enhancement at https://bugs.php.net/).

@samsonasik samsonasik linked an issue Aug 5, 2020 that may be closed by this pull request
test/Transport/SendmailTest.php Outdated Show resolved Hide resolved
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
@weierophinney weierophinney added this to the 2.12.2 milestone Aug 6, 2020
weierophinney added a commit that referenced this pull request Aug 6, 2020
Signed-off-by: Matthew Weier O'Phinney <[email protected]>
@weierophinney weierophinney merged commit 461d35a into laminas:2.12.x Aug 6, 2020
@samsonasik samsonasik deleted the fix-19 branch August 6, 2020 14:12
weierophinney added a commit that referenced this pull request Aug 6, 2020
Signed-off-by: Matthew Weier O'Phinney <[email protected]>
artemii-karkusha pushed a commit to artemii-karkusha/laminas-mail that referenced this pull request May 24, 2023
Signed-off-by: Matthew Weier O'Phinney <[email protected]>
artemii-karkusha pushed a commit to artemii-karkusha/laminas-mail that referenced this pull request May 24, 2023
Signed-off-by: Matthew Weier O'Phinney <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subject header is duplicated
3 participants