When connect to gmail using nodejs imap in MacOS, some error comes up

依然范特西╮ 提交于 2019-12-10 12:04:58

问题


I have a node.js program to watch specific email from my supplier. It works well on a windows 7 system, but it does not work in MacOS.

When run shell script in MacOS terminal, some error comes up. This is the shell command I run:

#!/bin/bash
node uploadCSV.js

(This command is in run.command file)

This is the whole error I had seen:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Invalid credentials v46mb316321295eeg
.............

And first part to connect to my gmail in js file that I had run:

var Imap = require('imap'), inspect = require('util').inspect;

var imap = new Imap({ user: 'tomitanaka999@gmail.com', password: 'greatlife', host: 'imap.gmail.com', port: 993, tls: true });

var fs = require('fs'); var base64 = require('base64-stream'); var Client = require('ftp'); var fs = require('fs');

Who can help me? I'd like to fix this error as soon as possible.

来源:https://stackoverflow.com/questions/27984954/when-connect-to-gmail-using-nodejs-imap-in-macos-some-error-comes-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!