I setup the EMAIL_URL
process.env.MAIL_URL="smtp://xx%40gmail.com:[email protected]:465"
This worked find with
Email.send({
to: '[email protected]',
from: '[email protected]',
subject: 'test',
text: 'some text'
});
However this failed
Accounts.config({
sendVerificationEmail: true
})
or
Accounts.sendVerificationEmail(userId,email)
giving me errors
Exception while invoking method 'createUser' RecipientError: Can't send mail - all recipients were rejected
at Object.Future.wait (.meteor\tools\dc9fb5197a\lib\node_modules\fibers\future.js:326:15)
at smtpSend (packages/email/email.js:91)
at Object.Email.send (packages/email/email.js:152)
at Object.Accounts.sendVerificationEmail (packages/accounts-password/password_server.js:571)
at packages/accounts-password/password_server.js:692
at tryLoginMethod (packages/accounts-base/accounts_server.js:171)
at Object.Accounts._loginMethod (packages/accounts-base/accounts_server.js:287)
at Meteor.methods.createUser (packages/accounts-password/password_server.js:668)
at maybeAuditArgumentChecks (packages/livedata/livedata_server.js:1487)
at packages/livedata/livedata_server.js:643
at SMTPClient._actionRCPT (.meteor\packages\email\a59237d5f0\npm\node_modules\simplesmtp\lib\client.js:909:27)
at SMTPClient._onData (.meteor\packages\email\a59237d5f0\npm\node_modules\simplesmtp\lib\client.js:329:29)
at CleartextStream.emit (events.js:95:17)
at CleartextStream. (_stream_readable.js:748:14)
at CleartextStream.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:410:10)
at _stream_readable.js:403:7
at process._tickCallback (node.js:419:13)
Any help is greatly appreciated!
I fixed this by adding the following to my server code:
Accounts.emailTemplates.from = "[email protected]";
I don't know why this should matter because I had already properly set my MAIL_URL with my username, but it does! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With