-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(providers): add mailtrap #4328
Conversation
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
moduleNameMapper: { | ||
axios: 'axios/dist/node/axios.cjs', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without that option Jest has problem with importing axios
inside Mailtrap SDK.
Any suggestions? Maybe I will use axios and their API directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine, we do use this similar approach in multiple providers
@@ -0,0 +1,82 @@ | |||
{ | |||
"name": "@novu/mailtrap", | |||
"version": "0.20.0-alpha.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provider template generator is "outdated", so I changed to that version manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will look into this, if we can automate the version updation inside the generator
|
||
return { | ||
id: response.message_ids[0], | ||
date: new Date().toISOString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mailtrap doesn't return own timestamp
That's a fantastic idea @michaldziuba03! I will let the rest of the team to review this, but amazing work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🌟
I would appreciate it if you could also add docs for it here 😇
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
moduleNameMapper: { | ||
axios: 'axios/dist/node/axios.cjs', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine, we do use this similar approach in multiple providers
@@ -0,0 +1,82 @@ | |||
{ | |||
"name": "@novu/mailtrap", | |||
"version": "0.20.0-alpha.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will look into this, if we can automate the version updation inside the generator
@BiswaViraj PR for docs is ready novuhq/docs#157 |
@michaldziuba03 Amazing, Can you please fix the conflicts So that I can merge? |
@BiswaViraj I fixed conflicts, I hope that no git conflicts arise in the meantime :) |
What change does this PR introduce?
This PR introduces new provider for email channel - Mailtrap.
They offer two services:
This PR creates provider for their Email Sending service.
API reference: https://api-docs.mailtrap.io/docs/mailtrap-api-docs/67f1d70aeb62c-send-email
Mailtrap SDK: https://github.com/railsware/mailtrap-nodejs
Why was this change needed?
Closes #4325
Other information (Screenshots)
Workflow with provider
Integration store with
IS_MULTI_PROVIDER_CONFIGURATION_ENABLED=true
Integration store default view
Email sent with attachement