Meteor mail sending getting error -
when send mail in meteor gives error.please me.
process.env.mail_url="smtp://abc@gmail.com:password@smtp.gmail.com:465/"; // send e-mail email.send({ to: "abc@gmail.com", from: "sbc@gmail.com", subject: "website contact form - message ", text: "hello" }); this error getting.
exception while invoking method 'userregistration' autherror: invalid login - 534-5.7.14 <https://accounts.google.com/continuesignin?sarp=1&scc=1&plt=akgnsbsng i20150615-14:31:12.494(5.5)? @ object.future.wait (/home/vamsi/.meteor/packages/meteor-tool/.1.1.3.1ullkdf++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:398:15) i20150615-14:31:12.495(5.5)? @ smtpsend (packages/email/email.js:76:1) i20150615-14:31:12.495(5.5)? @ object.email.send (packages/email/email.js:153:1) i20150615-14:31:12.495(5.5)? @ [object object].userregistration (app/server/registration.js:24:23) i20150615-14:31:12.495(5.5)? @ maybeauditargumentchecks (packages/ddp/livedata_server.js:1617:1) i20150615-14:31:12.495(5.5)? @ packages/ddp/livedata_server.js:648:1 i20150615-14:31:12.495(5.5)? @ [object object]._.extend.withvalue (packages/meteor/dynamics_nodejs.js:56:1) i20150615-14:31:12.495(5.5)? @ packages/ddp/livedata_server.js:647:1
your mail_url login , password should uri encoded using encodeuricomponent :
var login = encodeuricomponent("abc@gmail.com"); var password = encodeuricomponent("password"); var domain = "smtp.gmail.com"; var port = 465; process.env.mail_url = "smtp://" + login + ":" + password + "@" + domain + ":" + port; it give smtp://abc%40gmail.com:password@smtp.gmail.com:465.
Comments
Post a Comment