
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
mailbox-address
Advanced tools
Validate syntax for a RFC 5321/6531(SMTPUTF8) email mailbox address.
Validate syntax for a RFC 5321/6531(SMTPUTF8) email mailbox address.
For the latest stable version:
npm install mailbox-address
import { validate, MailboxType } from "mailbox-address";
const address = "Διεθνές@Greek.com";
const valid = mailboxAddress.validate(address, MailboxType.SMTPUTF8);
if (valid) {
console.log(`${valid} is a valid internationalized (SMTPUTF8) email mailbox address.`);
} else {
console.log(`${address} is NOT a valid internationalized (SMTPUTF8) email mailbox address.`);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<script src="https://unpkg.com/mailbox-address"></script>
</head>
<body>
<p>Try playing with <code>mailboxAddress</code> in the console.</p>
<p><b id="address"></b> is a <b id="valid"></b> internationalized (SMTPUTF8) email mailbox address.</p>
<script>
const SMTPUTF8 = 1;
const address = "Διεθνές@Greek.com";
const valid = mailboxAddress.validate(address, SMTPUTF8);
document.getElementById('address').innerText = valid || address;
document.getElementById('valid').innerText = valid ? 'valid' : 'invalid';
</script>
</body>
</html>
validate(mailbox: string, type?: MailboxType): string | false
MIT
FAQs
Validate syntax for a RFC 5321/6531(SMTPUTF8) email mailbox address.
The npm package mailbox-address receives a total of 105 weekly downloads. As such, mailbox-address popularity was classified as not popular.
We found that mailbox-address 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.