-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add support for attachments and inline attachments as bytes arrays. #87
base: master
Are you sure you want to change the base?
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.
(let [props (doto (Properties.) | ||
(.load (io/input-stream pom)))] | ||
(.getProperty props "version")) | ||
"")) |
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.
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" |
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.
Not for the PR
(let [headers (doto (InternetHeaders.) | ||
(.setHeader "Content-Transfer-Encoding" "base64"))] | ||
(javax.mail.internet.MimeBodyPart. headers | ||
(:content part)))) |
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.
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
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.