![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This NPM package offers integration with the official API for Mailtrap.
Quickly add email sending functionality to your Node.js application with Mailtrap.
Versions of this package up to 2.0.2 were an unofficial client developed by @vchin. Package version 3 is a completely new package. It is still under development and does not support the testing API yet. Please continue using version 2 if you need access to the testing API.
Use yarn or npm to install the package:
yarn add mailtrap
# or, if you are using NPM:
npm install mailtrap
import { MailtrapClient } from "mailtrap"
/**
* For this example to work, you need to set up a sending domain,
* and obtain a token that is authorized to send from the domain.
*/
const TOKEN = "<YOUR-TOKEN-HERE>";
const SENDER_EMAIL = "<SENDER@YOURDOMAIN.COM>";
const RECIPIENT_EMAIL = "<RECIPIENT@EMAIL.COM>";
const client = new MailtrapClient({ token: TOKEN });
const sender = { name: "Mailtrap Test", email: SENDER_EMAIL };
client
.send({
from: sender,
to: [{ email: RECIPIENT_EMAIL }],
subject: "Hello from Mailtrap!",
text: "Welcome to Mailtrap Sending!",
})
.then(console.log)
.catch(console.error);
Refer to the examples
folder for the source code of this and other advanced examples.
NOTE: Nodemailer is needed as a dependency.
yarn add nodemailer
# or, if you are using NPM:
npm install --s nodemailer
If you're using Typescript, install @types/nodemailer
as a devDependency
.
yarn add --dev @types/nodemailer
# or, if you are using NPM:
npm install --s-dev @types/nodemailer
You can provide Mailtrap specific keys like `category`, `customVariables`, `templateUuid` and `templateVariables`.
See transport usage below:
This library is developed using TypeScript.
Use yarn lint
to perform linting with ESLint.
Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The package is available as open source under the terms of the MIT License.
Everyone interacting in the Mailtrap project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Official mailtrap.io API client
The npm package mailtrap receives a total of 7,105 weekly downloads. As such, mailtrap popularity was classified as popular.
We found that mailtrap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.