![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.
@anxolin/mail
Advanced tools
Basic mail sender
Implement a repository for easily sending mails.
It uses nodemailer
and all methods return promises.
First install dependencies:
yarn add anxolin/node-mail --save # npm install anxolin/mail --save
Then, use it:
const nodeMail = require('node-mail')({
user: 'your-user',
password: 'your-password',
host: 'your-password'
})
// Verify the connection
nodeMail
.verify()
.then(success => console.log('Mail connection result: %s', success))
.catch(console.error)
nodeMail
.sendMail({
from: 'foo@example.com',
to: 'baz@example.com',
subject: 'Hi there ✔',
text: 'How are you doing?',
html: 'How are <b>you</b> doing?'
})
.then(mailInfo => console.log('Mail sent: %s', mailInfo.messageId))
.catch(console.error)
const nodeMail = require('node-mail')(config)
Where config
may contain:
Parameter | Required | Description |
---|---|---|
user | Yes | User for the mail authentication |
password | Yes | Password for the mail authentication |
host | Yes | Mail server host |
port | No. Default 587 | Port |
secure | No. Default false | Secure |
requireTLS | No. Dedault true | Require TLS |
To test, execute:
yarn install
# Execute
MAIL_USER=foo@example.com \
MAIL_PASSWORD=your-pass-here \
HOST=mail.example.com \
FROM=foo@example.com \
TO=baz@example.com \
SUBJECT="Hi there ✔" \
TEXT="How are you doing?" \
HTML="How are <b>you</b> doing?" \
yarn send-mail
A simpler approach to execute the mail sender is to create a .env
file:
MAIL_USER=foo@example.com
MAIL_PASSWORD=your-pass-here
HOST=mail.example.com
FROM=foo@example.com
TO=baz@example.com
SUBJECT="Hi there ✔"
TEXT="How are you doing?"
HTML="How are <b>you</b> doing?"
yarn send-mail
yarn test
FAQs
Simple mail repository
We found that @anxolin/mail demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.