Closed jkrenge closed 8 years ago
Any updates on this?
I think I'm just stupid. :-)
What happened? I'm having a similar issue: the attachment array is populated correctly, but I have no way to access the actual content of the attachment. I tracked it down to https://github.com/andris9/mailparser#attachment-streaming -- take a look at https://github.com/Flolagale/mailin/blob/master/lib/mailin.js to see how mailin is using MailParser -- and it's pretty clear how to get the actual attachment content from a MailParser instance, but I just don't know how to access that instance from within mailin. Any ideas? Could you maybe post an example of how you streamed your attachments? :100:
For me, the whole attribute attachments
was gone, so I think it was rather removed by different code before processing. But, I hacked it a little bit:
I basically store the whole raw email, as I want to archive the file anyways:
mailin.on('message', function(connection, data, content) {
fs.writeFile(output, content, function(err) {
if (err) console.log(err);
});
});
Then I monitor the folder where the emails are stored and extract contents manually:
We will fix this, but for the meantime this also kind of works. :-)
Thanks! :+1:
Hi there! First off: I am amazed by mailin, awesome piece of software. Saved me days in development. I have a slight issue with the attachments though:
I am not using the
webhook
, but rather the embedded mailin server. For that, I plugged myself intomailin.on('message', function(connection, data, content) {});
. And this works fine, but somehowdata.attachments
is always non-existing. For debugging I printed bothdata
andcontent
:Excerpt from
content
:But in
data
(shortened):Then I tried to check the webhook: But enabling this even throws an exception and mailin crashes.
Any ideas? :-)