Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Is it possible to provide features like downloading attachments? #14

Open
rahulmr opened this issue Jun 29, 2015 · 5 comments
Open

Is it possible to provide features like downloading attachments? #14

rahulmr opened this issue Jun 29, 2015 · 5 comments

Comments

@rahulmr
Copy link

rahulmr commented Jun 29, 2015

Is it possible to provide features like downloading attachments?

Is it possible to configure my own server using mailsac open source with my own domain and then have some option to download or see attachments?

Thanks!

@lifehome
Copy link

@rahulmr mailpraser does the job, but this is something awaits for implementation, maybe v2?

@rahulmr
Copy link
Author

rahulmr commented Jul 20, 2015

Thanks for the update. Please do let me know once you have implemented it in v2 :)

@ruffrey
Copy link
Owner

ruffrey commented Jul 20, 2015

Sorry guys I have been tied up and keep meaning to give mailsac love to release the latest. but that has not happened. If you need a quick-and-dirty way to grab attachments:

https://github.com/ruffrey/mailsac/blob/master/lib/mailserver.js#L117

after mailparser gets it, the attachments might be sitting right there as base64, but we are (at this time) intentionally dropping them. you could insert them into mongodb as a base64 then do the work to render them on your end. From an express route, something like: res.set('content-type', 'whatever/attachment-type'); res.send(new Buffer(attachmentAsBase64, 'base64')).

@rahulmr
Copy link
Author

rahulmr commented Aug 4, 2015

Thanks but I am just an end user :( so do not know how to do what you have suggested. Where to put the res.set on which line etc. Sorry.

@rahulmr
Copy link
Author

rahulmr commented May 6, 2016

@ruffrey it seems code is changed now. Could you please suggest a better way to get the attachment? Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants