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

Proper formatting of long subjects. #1437

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
7 participants
@petrkle
Copy link
Contributor

commented Mar 6, 2014

Under Windows Message::EOL and PHP_EOL are same and everything work fine. But in Linux \r\n is replaced by \n and long subjects are send in wrong format.

@hrach

This comment has been minimized.

Copy link
Contributor

commented Mar 7, 2014

Could you please add test?

@hrach hrach added 1-bug labels Mar 7, 2014

@Majkl578

This comment has been minimized.

Copy link
Contributor

commented Mar 7, 2014

long subjects are send in wrong format

In what way? Does it break any RFC?

@petrkle

This comment has been minimized.

Copy link
Contributor Author

commented Mar 7, 2014

In what way? Does it break any RFC?

In RFC822 are parts of long headers divided by CRLF.

@mishak87

This comment has been minimized.

Copy link

commented on tests/Nette/Mail/Mail.sendmail.phpt in 1316610 Mar 9, 2014

Tested string should be in English and of minimal necessary length. Some explanation of why or what is actually tested wouldn't hurt.

It should test whole subject since it is about binary compatibility.

@dg

This comment has been minimized.

Copy link
Member

commented Mar 12, 2014

In this case testing is IMHO impossible.

Emails uses only CRLF, but Unix mail replaces LF by CRLF automatically, which leads to doubling CR if CRLF is used. See http://cz1.php.net/manual/en/function.mail.php

According to PHP source codes, Subject + To must contain CRLF. Can you fix "To" too?

@dg dg closed this in c3e78cc Mar 12, 2014

dg added a commit to nette/mail that referenced this pull request Mar 13, 2014

dg added a commit to nette/mail that referenced this pull request Mar 18, 2014

@janedbal

This comment has been minimized.

Copy link

commented Apr 15, 2014

This commit caused me problems when recieving sending emails from wedos mailserver to some webservers (gmail seems ok). It trimmes the subject after several characters and the content of email is displayed as RAW contents of email message (with headers, boundaries, ...)

Is this problem on wedos mailserver or is it possible, that the solution is not 100% correct?

@icaine

This comment has been minimized.

Copy link

commented Apr 17, 2014

@CasperN confirming the problem.. Some of our clients receive base64 chars instead of attachments. Reverting to the version with str_replace fixed it.

@hrach

This comment has been minimized.

Copy link
Contributor

commented Apr 18, 2014

Reopening the issue.

@hrach hrach reopened this Apr 18, 2014

@dg

This comment has been minimized.

Copy link
Member

commented Apr 18, 2014

It is related to "subject" or "to" parameter?

@icaine

This comment has been minimized.

Copy link

commented Apr 18, 2014

Seems its subject related problem (http://i.imgur.com/IvCRbUf.png)

dg added a commit that referenced this pull request Apr 19, 2014

dg added a commit to nette/mail that referenced this pull request Apr 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.