-
Notifications
You must be signed in to change notification settings - Fork 222
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
Server-side CHUNKING and BINARYMIME support #106
Conversation
Codecov Report
@@ Coverage Diff @@
## master #106 +/- ##
==========================================
- Coverage 62.52% 62.21% -0.31%
==========================================
Files 8 8
Lines 982 1101 +119
==========================================
+ Hits 614 685 +71
- Misses 275 309 +34
- Partials 93 107 +14
Continue to review full report at Codecov.
|
backend.go
Outdated
@@ -24,6 +24,9 @@ type Backend interface { | |||
// MailOptions contains custom arguments that were | |||
// passed as an argument to the MAIL command. | |||
type MailOptions struct { | |||
// Value of BODY= argument, 7BIT, 8BITMIME or BINARYMIME. | |||
Body string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we provide a type and constants for valid values?
conn.go
Outdated
|
||
select { | ||
case <-c.dataResult: | ||
c.dataResult <- errPanic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can unconditionally send the error to the dataResult
channel here I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I forgot to update this path when copy-pasting code from previous PR.
conn.go
Outdated
io.Copy(ioutil.Discard, &chunk) | ||
|
||
code, enhancedCode, msg := toSMTPStatus(err) | ||
c.WriteResponse(code, enhancedCode, msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: I think this works:
c.WriteResponse(toSMTPStatus(err))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the whole looks good! With these comments fixed this is good to merge.
Also please squash the commits into logical commits. |
I just realized I have local changes I forgot to commit that resolve some of issues you mentioned. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot!
See #81. This issue is not closed since it also references client support.
Replaces #104 (but hey, that initial solution saves one message copy :) )