vithalreddy/node-mailin

I have this error

emanueldev1 opened this issue · 2 comments

mail@gmail.com
verbose: Connection id c3eca05a-cd87-4f5a-bc9a-545961f44c75
info: c3eca05a-cd87-4f5a-bc9a-545961f44c75 Receiving message from contact@domain.com
{
id: 'c3eca05a-cd87-4f5a-bc9a-545961f44c75',
secure: true,
localAddress: 'ip',
localPort: 465,
remoteAddress: 'ip',
remotePort: 54252,
clientHostname: 'ns',
openingCommand: 'EHLO',
hostNameAppearsAs: '[127.0.0.1]',
xClient: Map(0) {},
xForward: Map(0) {},
transmissionType: 'ESMTPS',
tlsOptions: {
name: 'TLS_AES_256_GCM_SHA384',
standardName: 'TLS_AES_256_GCM_SHA384',
version: 'TLSv1.3'
},
envelope: {
mailFrom: { address: 'contact@domain.com', args: false },
rcptTo: [ [Object] ]
},
transaction: 1,
mailPath: '.tmp\c3eca05a-cd87-4f5a-bc9a-545961f44c75'
}
info: c3eca05a-cd87-4f5a-bc9a-545961f44c75 Processing message from contact@mail.index-dev.tech
verbose: c3eca05a-cd87-4f5a-bc9a-545961f44c75 Validating dkim.
verbose: c3eca05a-cd87-4f5a-bc9a-545961f44c75 Validating spf.
verbose: validsting spf for host mail.index-dev.tech and ip [ip]
verbose: c3eca05a-cd87-4f5a-bc9a-545961f44c75 Parsing email.
parseEmail err: TypeError: Cannot set property errored of # which has only a getter
at new MessageSplitter (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailsplit\lib\message-splitter.js:24:22)
at new MailParser (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailparse\lib\mail-parser.js:33:25)
at module.exports (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailparse\lib\simple-parser.js:25:18)
at C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:312:36
at Promise._execute (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\debuggability.js:384:9)
at Promise._resolveFromExecutor (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:518:18)
at new Promise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:103:10)
at parseEmail (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:307:16)
at C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:215:21
at tryCatcher (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:673:18)
at Promise._resolveCallback (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:466:57)error: c3eca05a-cd87-4f5a-bc9a-545961f44c75 Unable to validate dkim. Consider dkim as failed.
error: Error: No header boundary found
at Object.verify (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\dkim\lib\verify.js:18:22)
at Object.validateDkim (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\mailUtilities.js:25:10)
at Object.tryCatcher (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\util.js:16:23)
at Object.ret [as validateDkimAsync] (eval at makeNodePromisifiedEval (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promisify.js:184:12), :13:39)
at validateDkim (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:260:30)
at C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:212:21
at tryCatcher (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:673:18)
at Promise._resolveCallback (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:466:57) at Promise._settlePromiseFromHandler (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:559:17)
at Promise._settlePromise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:649:10)
error: c3eca05a-cd87-4f5a-bc9a-545961f44c75 Unable to finish processing message!!
{
message: 'Cannot set property errored of # which has only a getter',
stack: 'TypeError: Cannot set property errored of # which has only a getter\n' +
' at new MessageSplitter (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailsplit\lib\message-splitter.js:24:22)\n' +
' at new MailParser (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailparse\lib\mail-parser.js:33:25)\n' +
' at module.exports (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailparse\lib\simple-parser.js:25:18)\n' +
' at C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:312:36\n' +
' at Promise._execute (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\debuggability.js:384:9)\n' +
' at Promise._resolveFromExecutor (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:518:18)\n' +
' at new Promise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:103:10)\n' +
' at parseEmail (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:307:16)\n' +
' at C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:215:21\n' +
' at tryCatcher (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\util.js:16:23)\n' +
' at Promise._settlePromiseFromHandler (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:547:31)\n' +
' at Promise._settlePromise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:604:18)\n' +
' at Promise._settlePromise0 (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:649:10)\n' +
' at Promise._settlePromises (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:729:18)\n' +
' at Promise._fulfill (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:673:18)\n' +
' at Promise._resolveCallback (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:466:57)'
}
error: TypeError: Cannot set property errored of # which has only a getter
at new MessageSplitter (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailsplit\lib\message-splitter.js:24:22)
at new MailParser (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailparse\lib\mail-parser.js:33:25)
at module.exports (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailparse\lib\simple-parser.js:25:18)
at C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:312:36
at Promise._execute (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\debuggability.js:384:9)
at Promise._resolveFromExecutor (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:518:18)
at new Promise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:103:10)
at parseEmail (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:307:16)
at C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:215:21
at tryCatcher (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:673:18)
at Promise._resolveCallback (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:466:57)Unhandled rejection TypeError: Cannot set property errored of # which has only a getter
at new MessageSplitter (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailsplit\lib\message-splitter.js:24:22)
at new MailParser (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailparse\lib\mail-parser.js:33:25)
at module.exports (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\mailparse\lib\simple-parser.js:25:18)
at C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:312:36
at Promise._execute (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\debuggability.js:384:9)
at Promise._resolveFromExecutor (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:518:18)
at new Promise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:103:10)
at parseEmail (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:307:16)
at C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\node-mailin\lib\node-mailin.js:215:21
at tryCatcher (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:673:18)
at Promise._resolveCallback (C:\Users\admin\Desktop\PRODUCT EMAN\mailing\node_modules\bluebird\js\release\promise.js:466:57)

You can try this solution: #35 (comment)

Thank you, but the email still does not arrive, the user of the email must be created somehow? or just put the email and password that I decide and send mails? here

I get this on the console at the end
info: bc824758-d68e-4258-bb2d-118371ae736a End processing message, deleted .tmp\bc824758-d68e-4258-bb2d-118371ae736a

CODE:

nodeMailin.on("authorizeUser", function (connection, username, password, done) { if (username == "user" && password == "passs") { done(null, true); } else { done(new Error("Unauthorized!"), false); } });