Add support for attachments and inline attachments as bytes arrays.#87
Open
guilespi wants to merge 1 commit intodrewr:masterfrom
Open
Add support for attachments and inline attachments as bytes arrays.#87guilespi wants to merge 1 commit intodrewr:masterfrom
guilespi wants to merge 1 commit intodrewr:masterfrom
Conversation
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.
guilespi
commented
Mar 29, 2017
| (let [props (doto (Properties.) | ||
| (.load (io/input-stream pom)))] | ||
| (.getProperty props "version")) | ||
| "")) |
Author
There was a problem hiding this comment.
This doesn't need to be part of the PR, it was failing running from then REPL
guilespi
commented
Mar 29, 2017
| @@ -1,4 +1,4 @@ | |||
| (defproject com.draines/postal "3.0.0-SNAPSHOT" | |||
| (defproject com.intception/postal "3.0.1" | |||
guilespi
commented
Mar 29, 2017
| (let [headers (doto (InternetHeaders.) | ||
| (.setHeader "Content-Transfer-Encoding" "base64"))] | ||
| (javax.mail.internet.MimeBodyPart. headers | ||
| (:content part)))) |
Author
There was a problem hiding this comment.
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?
|
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 |
b199c5a to
382cb0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now only files were supported so if content was part of a stream it was necessary to pivot in a temporary file.
:contentis assumed to be a byte array of a base64 encoded file.