问题
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