mailsac
mailsac copied to clipboard
Is it possible to provide features like downloading attachments?
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!
@rahulmr mailpraser does the job, but this is something awaits for implementation, maybe v2?
Thanks for the update. Please do let me know once you have implemented it in v2 :)
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'))
.
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.
@ruffrey it seems code is changed now. Could you please suggest a better way to get the attachment? Thanks