-
-
Notifications
You must be signed in to change notification settings - Fork 578
Conversation
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.
The inconsistent spelling of Embedded
is bothering me a lot.
mail/message.go
Outdated
@@ -32,6 +33,7 @@ type Attachment struct { | |||
Name string | |||
Reader io.Reader | |||
ContentType string | |||
Embeded bool |
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.
Embedded
mail/message.go
Outdated
@@ -72,6 +74,19 @@ func (m *Message) AddAttachment(name, contentType string, r io.Reader) error { | |||
Name: name, | |||
ContentType: contentType, | |||
Reader: r, | |||
Embeded: false, |
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.
Embedded
mail/message.go
Outdated
m.Attachments = append(m.Attachments, Attachment{ | ||
Name: name, | ||
Reader: r, | ||
Embeded: true, |
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.
Embedded
mail/smtp_sender_test.go
Outdated
@@ -36,6 +36,8 @@ func TestSendPlain(t *testing.T) { | |||
m.Bcc = []string{"[email protected]"} | |||
|
|||
m.AddAttachment("someFile.txt", "text/plain", bytes.NewBuffer([]byte("hello"))) | |||
m.AddAttachment("otherFile.txt", "text/plain", bytes.NewBuffer([]byte("bye"))) | |||
m.AddEmbeded("test.jpg", bytes.NewBuffer([]byte("not a real image"))) |
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.
addEmbedded()
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.
@kteb this looks great. We just need to fix the spelling of Embedded
, which is why the tests failed. You can run grift tools:lint
in the gobuffalo/buffalo
root folder and it will run a bunch of linting tools on your code to make sure it passes stuff like this. :) This will be a nice feature. Thanks!
Is something still missing ? |
Looks great. Thanks! |
* Fixed bug when attaching more thant one file * Add AddEmbeded methods to a message * Spelling fixes
First trial implementation for fixing the following issue: #1040