Hello,
I have the following code server-sided
process.env.MAIL_URL = "smtp://user@gmail.com:password@smtp.gmail.com:587";
sendEmail: function (to, subject, text) {
var from = "user@gmail.com";
this.unblock();
Email.send({
to: to,
from: from,
subject: subject,
text: text
});
},
Works perfectly, no issues. However please note that I need to send from smtp.myserver.com without authentication, and as a result of not doing so I am getting:
I20170721-12:59:32.885(3)? Exception while invoking method 'sendEmail' Error: In
valid login: 535 Incorrect authentication data
I20170721-12:59:32.886(3)? at Object.Future.wait (C:\Users\Alex\AppData\Loca
l\.meteor\packages\meteor-tool\1.4.4\mt-os.windows.x86_32\dev_bundle\server-lib\
node_modules\fibers\future.js:449:15)
I20170721-12:59:32.887(3)? at Mail._syncSendMail (packages\meteor.js:213:24)
I20170721-12:59:32.887(3)? at smtpSend (packages\email.js:116:13)
I20170721-12:59:32.888(3)? at Object.Email.send (packages\email.js:174:5)
I20170721-12:59:32.889(3)? at [object Object].Meteor.methods.sendEmail (serv
er/main.js:419:11)
I20170721-12:59:32.889(3)? at maybeAuditArgumentChecks (packages/ddp-server/
livedata_server.js:1737:12)
I20170721-12:59:32.889(3)? at packages/ddp-server/livedata_server.js:719:19
I20170721-12:59:32.889(3)? at [object Object]._.extend.withValue (packages\m
eteor.js:1122:17)
I20170721-12:59:32.890(3)? at packages/ddp-server/livedata_server.js:717:40
I20170721-12:59:32.890(3)? at [object Object]._.extend.withValue (packages\m
eteor.js:1122:17)
I20170721-12:59:32.890(3)? - - - - -
I20170721-12:59:32.890(3)? at SMTPConnection._formatError (C:\Users\Alex\App
Data\Local\.meteor\packages\email\1.2.3\npm\node_modules\node4mailer\lib\smtp-co
nnection\index.js:558:19)
I20170721-12:59:32.891(3)? at SMTPConnection._actionAUTHComplete (C:\Users\A
lex\AppData\Local\.meteor\packages\email\1.2.3\npm\node_modules\node4mailer\lib\
smtp-connection\index.js:1254:34)
I20170721-12:59:32.891(3)? at SMTPConnection.<anonymous> (C:\Users\Alex\AppD
ata\Local\.meteor\packages\email\1.2.3\npm\node_modules\node4mailer\lib\smtp-con
nection\index.js:341:26)
I20170721-12:59:32.891(3)? at SMTPConnection._processResponse (C:\Users\Alex
\AppData\Local\.meteor\packages\email\1.2.3\npm\node_modules\node4mailer\lib\smt
p-connection\index.js:707:20)
I20170721-12:59:32.892(3)? at SMTPConnection._onData (C:\Users\Alex\AppData\
Local\.meteor\packages\email\1.2.3\npm\node_modules\node4mailer\lib\smtp-connect
ion\index.js:510:14)
I20170721-12:59:32.892(3)? at TLSSocket.<anonymous> (C:\Users\Alex\AppData\L
ocal\.meteor\packages\email\1.2.3\npm\node_modules\node4mailer\lib\smtp-connecti
on\index.js:658:51)
I20170721-12:59:32.892(3)? at emitOne (events.js:77:13)
I20170721-12:59:32.892(3)? at TLSSocket.emit (events.js:169:7)
I20170721-12:59:32.893(3)? at readableAddChunk (_stream_readable.js:153:18)
I20170721-12:59:32.893(3)? at TLSSocket.Readable.push (_stream_readable.js:1
11:10)
How to I force meteor to send via given smtp server without trying to auth?
PS.
If I try to set it up in Outlook w/o auth smtp.myserver.com works perfectly.
Any idea how to solve this?