Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@elara-services/mailer
Advanced tools
Readme
@elara-services/mailer
package!This package allows you to send an SMS message or email via a Gmail account!
GMAIL API
SERVICE ON YOUR GOOGLE CLOUD ACCOUNT!const { Mailer } = require("@elara-services/mailer");
const mail = new Mailer("example@gmail.com", {
username: `Elara Services: Mailer`, // Your custom name for who sent the email (NOTE: It will show your gmail account to the user you send stuff to!)
clientId: "Your google apis client ID",
clientSecret: "Your google apis client secret",
refreshToken: "Your gmail refresh token",
});
mail.phone("PHONE_NUMBER", "Text message here");
// By default: It will use 'us' as the region
// By default: it will go through all of the carriers/providers to find the correct one to send it to if you don't provide a carrier when using the 'phone' function!
mail.email("boop@example.com", {
text: `Boop!`, // Optional
subject: `Henlo!`, // Optional
html: `<html><body><h1>Beep!</h1></body></html>`, // Optional
});
// NOTE: "text" or "html" is required! (one or the other has to be provided in order to work properly)
// Send the same info to multiple emails:
mail.email([
"foo@example.com",
"bar@example.com",
"...etc"
], {
text: `Boop!`, // Optional
subject: `Henlo!`, // Optional
html: `<html><body><h1>Beep!</h1></body></html>`, // Optional
});
const { Server } = require("@elara-services/mailer");
const server = new Server({
email: "your_gmail_account@gmail.com",
options: {
username: "Elara Services: Mailer",
clientId: "your_client_id",
clientSecret: "your_client_secret",
refreshToken: "your_refresh_token",
}
}, "API_KEY_HERE", 2020);
// "API_KEY_HERE" make sure to make the key secure!
// Replace 2020 with whatever you want the API's port number to be!
server.start(); // Make the server start listening for requests.
Authorization
header for all routes. (If you have the API key provided)/email
Body:
{
"email": "xxx",
"subject": "Email Subject (OPTIONAL)",
"text": "Text for the email",
"html": "HTML code for the email (Use 'html' or 'text')"
}
/sms
Body:
{
"phone": "xxx",
"text": "Text for the message"
}
/verify/sms
Body:
{
"phone": "123456789",
"codeLength": 20, // Verification code length. (OPTIONAL, DEFAULT: 15)
}
/verify/email
Body:
{
"email": "xxxx",
"codeLength": 20, // Verification code length. (OPTIONAL, DEFAULT: 15)
}
Success:
{
"status": true,
"code": "xxx"
}
Fail:
{
"status": false,
"message": "xxx"
}
FAQs
An easy to use package to send emails or SMS messages via a Gmail account.
The npm package @elara-services/mailer receives a total of 3 weekly downloads. As such, @elara-services/mailer popularity was classified as not popular.
We found that @elara-services/mailer demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.