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

UPGRADING.md out of sync #1242

Closed
risototh opened this Issue Nov 15, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@risototh

risototh commented Nov 15, 2017

I think, that at least this (below) part of the UPGRADING.md doc is not in sync with the code.

  • PHPMailer:$LE removed
  • PHPMailer::CRLF line ending constant renamed to PHPMailer::LE, defaults to "\r\n", used everywhere
  • All uses of PHPMailer::$LE property converted to use static:LE constant for consistency and ease of overriding

The PHPMailer:$LE is still in current codebase.
There is no PHPMailer::LE constant, but the PHPMailer::CRLF is already missing.
And the whole code still uses self::$LE property, not the self::LE constant.

Can you please adjust these issues? I used the PHPMailer::CRLF in my extension, so i need some "replacement" and protected property $LE is not a way, as i'm not extending the class.

Thanks.

Synchro added a commit that referenced this issue Nov 15, 2017

@Synchro

This comment has been minimized.

Member

Synchro commented Nov 15, 2017

I've updated the doc. What it said was true at one point before 6.0 was released - it wasn't clear at the time that mail() on some OSs breaks if you use CRLF breaks. The CRLF constant is gone (because there is no longer any need for it), but you can get the current break string with getLE(). The line break format is manipulated automatically at send() time, so setting it beforehand is likely to not work as you expect.

I don't know why you're using it, but generally line breaks within message bodies are normalised to the sending format before use, which may eliminate whatever you're using it for. This avoids problems with mixed line break formats which were a persistent problem in 5.2; 6.0 is far more consistent.

@risototh

This comment has been minimized.

risototh commented Nov 15, 2017

Ok, thanks, i will use the getLE(), i overlooked this method.

Why i'm using it? It's a special filter that switches all data-uri and external images into embedded attachments and also manipulates Body and AltBody...

@Synchro

This comment has been minimized.

Member

Synchro commented Nov 15, 2017

Similar to what msgHTML() does?

@Synchro Synchro closed this Nov 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment