RocketChat / RocketChat/Rocket.Chat

Resend verification email failure

Open
#19,273 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat: email
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Attempts to Resend verification email fail, but I can successfully send a test email. SMTP setup using a gmail address.

Steps to reproduce:
  1. Set up SMTP server using gmail.
  2. Click on "Send a test email to my user"
  3. Go to Avatar-> My Account -> Profile -> Resend verification email.
Expected behavior:
  • Test email successfully sends.
  • Verification email successfully sends.
Actual behavior:
  • Test email successfully sends
  • "Error sending email" message appears when attempting to send verification email.
Server Setup Information:
  • Version of Rocket.Chat Server: 3.6.2
  • Operating System: Ubuntu 20.04.1
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 12.16.1
  • MongoDB Version: 3.6.14
Client Setup Information
  • Desktop App or Browser Version: Both
  • Operating System: MacOS, Windows, Linux
Additional context
Relevant logs:

Server logs on failure:

I20201016-12:22:48.159(0) API ➔ debug POST: /api/v1/method.call/sendConfirmationEmail 


I20201016-12:22:48.162(0) Meteor ➔ method sendConfirmationEmail -> userId: BWnNCxJ2wNskN7NJ4, arguments: ["dw@stuycs.org"] 


I20201016-12:22:48.581(0) Exception while invoking method sendConfirmationEmail Error: Error trying to send email: Mail command failed: 555 5.5.2 Syntax error. n9sm2114054ilj.74 - gsmtp [error-email-send-failed]     at MethodInvocation.sendConfirmationEmail (server/methods/sendConfirmationEmail.js:21:10)     at MethodInvocation.methodsMap.<computed> (app/lib/server/lib/debug.js:67:34)     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)     at packages/ddp-server/livedata_server.js:1689:15     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)     at packages/ddp-server/livedata_server.js:1687:36     at new Promise (<anonymous>)     at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12)     at Server.apply (packages/ddp-server/livedata_server.js:1625:26)     at Server.call (packages/ddp-server/livedata_server.js:1607:17)     at Object.post (app/api/server/v1/misc.js:262:26)     at app/api/server/api.js:394:82     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)     at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39)     at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)     at packages/nimble_restivus/lib/route.coffee:59:33     at packages/simple_json-routes.js:98:9  => awaited here:     at Promise.await (/snap/rocketchat-server/1442/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)     at Server.apply (packages/ddp-server/livedata_server.js:1638:22)     at Server.call (packages/ddp-server/livedata_server.js:1607:17)     at Object.post (app/api/server/v1/misc.js:262:26)     at app/api/server/api.js:394:82     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)     at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39)     at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)     at packages/nimble_restivus/lib/route.coffee:59:33     at packages/simple_json-routes.js:98:9 

Server logs on success:

I20201016-14:15:35.981(0) API ➔ debug POST: /api/v1/method.call/sendSMTPTestEmail 

I20201016-14:15:35.983(0) Meteor ➔ method sendSMTPTestEmail -> userId: BWnNCxJ2wNskN7NJ4, arguments: [] 

I20201016-14:15:35.990(0) API ➔ debug Success {   statusCode: 200,   body: {     message: '{"msg":"result","id":"37","result":{"message":"Your_mail_was_sent_to_s","params":["dw@stuycs.org"]}}',     success: true   } } 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with server/methods/sendConfirmationEmail.js at the failing sendConfirmationEmail method, then compare its behavior with the successful sendSMTPTestEmail method described in the logs. Reproduce the failure using the listed Gmail SMTP setup and inspect the 555 error; done means Resend verification email succeeds without the error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.