Swift-SMTP icon indicating copy to clipboard operation
Swift-SMTP copied to clipboard

Modify Mail to allow folding of long header fields

Open sbeitzel opened this issue 2 years ago • 6 comments

Description

Add a folding function to the Mail struct and apply it to headers which might generate lines longer than the RFC-suggested 78 characters (or mandated 998 characters).

Motivation and Context

This change fixes issue #121.

How Has This Been Tested?

I have added unit tests for the wrap/unwrap functions.

Checklist:

  • [x] I have submitted a CLA form
  • [x] If applicable, I have updated the documentation accordingly.
  • [x] If applicable, I have added tests to cover my changes.

sbeitzel avatar Dec 22 '21 23:12 sbeitzel

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 22 '21 23:12 CLAassistant

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarcloud[bot] avatar Jan 10 '22 22:01 sonarcloud[bot]

@sbeitzel I had to make some changes to CI, would you mind rebasing?

dannys42 avatar Feb 07 '22 04:02 dannys42

@dannys42 When you say, "rebasing," um, what is it that you would like me to do? I have never performed that git operation before. I've just read some documentation that sort of explains what rebasing does to the history, but I'm not entirely sure what that means in the context of a pull request. Does it mean, create a new branch and merge this PR branch into it via rebase, then close this PR and open a new PR with the new branch? Or something else? I mean, I'm happy to cooperate and make your life easier; I just need to understand what I'm supposed to do.

sbeitzel avatar Feb 09 '22 01:02 sbeitzel

@sbeitzel Ah sorry... Yeah there's different approaches to this. My preference is rebasing. So my strategy here would be to:

git pull --rebase origin master

This will pull in any changes that have occurred on master. Then resolve any conflicts that occur (there shouldn't be any in your case).

Then when you're done, you'll have to do a git push --force or git push -f. This is because the history of your branch no longer matches your original commit.

Note you normally wouldn't have to do this if there are no merge conflicts (as is the case right now)... but in this case we have to bring in the changes to the CI configuration for the build to run correctly.

dannys42 avatar Feb 12 '22 00:02 dannys42

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarcloud[bot] avatar Feb 12 '22 00:02 sonarcloud[bot]