Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We currently are building functionality to allow sending emails from aRMT app on behalf of the study subject. The use case is that study subject are allowed to contact their assigned physician from within the app so that any problems or questions can be raised in a convenient manner.
This PR will implement a new POST endpoint
/email/projects/<projectId>/users/<subjectId>
endpoint. This endpoint receives a post body with structure:In response the Appserver will send the email.
The way how emails are sent is polymorphic. At present, the only method is by using the Firebase Trigger Email from Firestore extension. This method involves placing a JSON document in the Firebase database collection. The extension is configured to send emails from this database collection.
In the future, we can implement a way to directly send emails from Appserver. This would require to register SMTP server credentials in the service.
Remarks
to
,cc
andbcc
fields. In theory this would allow a subject to spam the whole world with emails. Lets discuss whether we need to change this.