laminas-mail
laminas-mail copied to clipboard
Update Sendmail.php
Remove the \r\n translation for mail headers per the PHP mail() page.
additional_headers (optional)
String or array to be inserted at the end of the email header.
This is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\r\n). If outside data are used to compose this header, the data should be sanitized so that no unwanted headers could be injected.
Q | A |
---|---|
Documentation | no |
Bugfix | yes |
BC Break | no |
New Feature | no |
RFC | no |
QA | no |
Description
This is fully documented in osTicket BR https://github.com/laminas/laminas-mail/issues/230.
Hi, can you add a test for the bugfix please?
@Slamdunk
Sure. Can you point me to an example? Looks like there are a lot of good examples in MessageTest.php. Should I just copy/mod one of those tests? With all those tests I'm really surprised this wasn't caught earlier.
So what I think I need to do is:
- Edit MessageTest.php
- Copy and modify one of the existing tests to meet the needs of this PR
- Ensure it works
- Add the test to this PR (is that correct?)
I added a new file into my fork ([cloudseeder/laminas-mail/tree/2.23.x/test)/Storage/HeaderTest.php) and some ci event kicked off from the main branch. Just want to make sure I do this correctly. I'm more of a ops guy than a programmer.
That's correct: go for it :muscle: