Skip to content
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

mail-listener4 how to download attachment file ? #2

Open
VivekPowar opened this issue Mar 22, 2019 · 5 comments
Open

mail-listener4 how to download attachment file ? #2

VivekPowar opened this issue Mar 22, 2019 · 5 comments

Comments

@VivekPowar
Copy link

also attachment.path is undefined
mailListener.on("attachment", function(attachment){
console.log(attachment.path);
});

@MateMalice
Copy link
Collaborator

Hi Vivek,

If you're using a newer version of Node that supports ES6+ features, you might want to try my fork (Which will eventually get merged as per the open pull request) - that one does not seem to have this problem, though it buffers attachments rather than streaming them so it might use lots of RAM for large files.

See here:
https://github.com/MatejMalicek/mail-listener2

Cheers,

M

@VivekPowar
Copy link
Author

Thanks @MatejMalicek it's working fine now, but the issue is in attachments .msg (Outlook mail) file extension is not downloading also its not give the filename also in attachments array. So can you help me for that file extension download.

@MateMalice
Copy link
Collaborator

Hi Vivek,

Sorry for the late reply - I've been quite busy over the last week.

So that I can investigate the issue, could you please confirm the following:

  • Which version of the package you installed (should be in the package.json file).
  • Which version of NodeJS you're using.
  • A copy/paste of the console log, as well as a snippet showing the attachment array with no filename, but with personal/confidential information such as email addresses, names, crypto signatures, etc. taken out (I don't need this for debugging and it should never be publicly posted anyway - really I just need to see the output you're getting).
  • Confirm if the problem only applies to .msg attachments, or other attachment types as well.
  • Confirm the version of NodeJS and the OS, kernel version, build no, etc.
  • Steps to reproduce.

It may well be a bug in the mail parser that's treating the .msg files as actual emails, rather than attachments, but it'll be hard for me to isolate the problem without more information. Info about the environment you're using (i.e. Node version, OS, etc.) and steps to reproduce are particularly important, as if you provide this, I might be able to reproduce the problem myself & identify the root cause without needing your logs, etc.

Once you provide this info, I'll have a look at it when I get the time. :-)

Cheers,

Matej

@azaitw
Copy link

azaitw commented Apr 18, 2019

Add this option:
mailParserOptions: { stream: true }

(Suggest adding this into README.md)

@Pranav-Dakshina
Copy link
Owner

@VivekPowar I guess @azaitw answered your question. Let me know otherwise, we can dig deeper into the issue.

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

No branches or pull requests

4 participants