Questions tagged [node-imap]

41 questions
7
votes
2 answers

Use node-imap to retrieve emails

Here is a module retrieve_email.js which connects to my gmail account and download the UNSEEN emails after a date. The code is pretty much copied from the example of the [imap module]1. const Imap = require('imap'); const inspect =…
user938363
  • 9,990
  • 38
  • 137
  • 303
3
votes
1 answer

Receiving IDLE notifications using node-imap

I've successfully connected to a mailbox with node-imap: const imap = new Imap({ user: 'user@yandex.com', password: 'pwd', host: 'imap.yandex.com', port: 993, tls: true }); imap.once('ready', () => { console.log('Opening…
Kong
  • 8,792
  • 15
  • 68
  • 98
2
votes
1 answer

Testing to receive mail with Cypress and Node-imap fails with missing 'net' module

I want to use node-imap or the imap package from NPM in Cypress to check whether certain E-mails are received and to check their contents. When I try a basic copy from the example taken from the imap github and docs it fails with the following…
2
votes
1 answer

Node Imap cannot change seen to unseen for office 365

I am trying to update flag of a email message from offcie 365 account from 'seen' to 'unseen' using node imap. I don't get any error but the message still remains seen. Same code works for Gmail. Similar logic works for office 365 for flagging a…
Rajjy
  • 176
  • 13
2
votes
0 answers

How to get all the emails sent to and received from an email Id?

I'm trying to implement node-imap and I need to get all the emails received from and sent to an email id. I've been able to use https://developers.google.com/oauthplayground to generate a refresh token but it expires in an hour so I need a method to…
1
vote
0 answers

Is it possible to reply when reading emails with Imap or node-imap?

I'm connecting to the imap outlook server, in this case when reading an email; after applying a validation I should reply to the sender, from the address; for example, if the email sender is unknown based on a db query; I should reply to the…
IBot
  • 356
  • 3
  • 20
1
vote
1 answer

How to mark a specific mail as read using node-imap

I develop both the frontend and backend of a custom intern application, in which you can receive and read mails using the node-imap package. There is a property you can set so that whenever an unread mail is fetched it gets set as read, but this is…
Fumée Noire
  • 93
  • 1
  • 8
1
vote
1 answer

[outlook]: LOGIN failed while connecting through node-imap

I am trying to connect Imap in the localhost, but getting a debug log as below, but the username and passwords are correct. I am able to connect through web interface with the login credentials. <= '* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN…
Saravanan
  • 47
  • 1
  • 8
1
vote
1 answer

How to connect node-imap module inside AWS Lambda function

I have this email server that I have to create as a microservice for two web applications that the company I work on, and the architecture is somewhat like this: Node app running a scan every x minutes through a list of clients emails and checking…
1
vote
2 answers

Error in sending response while using node-imap?

I am using imap for user authentication to a server. I am using express for server and https://github.com/mscdex/node-imap for imap. Controller Function exports.authenticateUser = async (req, res) => { let username = req.body.username; …
Nimish Agrawal
  • 511
  • 1
  • 5
  • 11
1
vote
2 answers

How to implement retry mechanism for node imap

I am using IMAP NPM to get emails. I wanted to know how i can handle retry mechanism while fetching Email information. Official page don't have any documentation for the same Code works successfully to fetch Email information. I tried to manually…
Rajjy
  • 176
  • 13
1
vote
1 answer

I'm expecting token from the body of email but it dumps = sign after every line

I'm using npm package(node-imap) to retrieve the body of email and I'm successfully able to retrieve the body of email but it dumping = after every line in the last My code is: var Imap = require('imap'), inspect = require('util').inspect; var…
user10522025
1
vote
0 answers

Node Imap fetch children folder content

I didn't find any information about how retrieve email inside a children folder in my inbox using node-imap library. This is my inbox structure : INBOX CHILDREN CHILDREN2 I must retrieve all email in Children2. Thanks for your attention. I’m…
Atomx
  • 96
  • 2
  • 6
1
vote
1 answer

Node-imap displaying emails

I've been trying to display emails properly, but failing to do so. I've just send email to myself and it looks like this when i open it in hotmail But when i open it in my app using node-imap, from 'Sent box' it looks like this (notice those '='…
Kerim092
  • 1,367
  • 1
  • 12
  • 32
1
vote
1 answer

Custom flags node-imap

Is there a way to add custom flags in node-imap?? I wanted to add flag like 'Starred' or 'Important' but not successful yet. I've read in the docs something about permFlags and adding custom flags provided by server but not sure if they think server…
Kerim092
  • 1,367
  • 1
  • 12
  • 32
1
2 3