Skip to content

Conversation

@guilespi
Copy link

Now only files were supported so if content was part of a stream it was necessary to pivot in a temporary file.

:content is assumed to be a byte array of a base64 encoded file.

Now only files were supported so if content was part of a stream it was necessary to pivot in a temporary file.

`:content` is assumed to be a byte array of a base64 encoded file.
(let [props (doto (Properties.)
(.load (io/input-stream pom)))]
(.getProperty props "version"))
""))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't need to be part of the PR, it was failing running from then REPL

@@ -1,4 +1,4 @@
(defproject com.draines/postal "3.0.0-SNAPSHOT"
(defproject com.intception/postal "3.0.1"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for the PR

(let [headers (doto (InternetHeaders.)
(.setHeader "Content-Transfer-Encoding" "base64"))]
(javax.mail.internet.MimeBodyPart. headers
(:content part))))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming it's a byte-array not previously encoded, maybe the library could be doing the encoding itself.

Didn't want to add a new dependency to do that though, what's your take on it?

@vincent-dm
Copy link

vincent-dm commented Jan 17, 2018

Is anyone still looking at this? I have to attach send e-mails with inline images which are byte arrays and I really want to avoid the tmp-file route...

I created an alternate pull request: #96

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants