Skip to content

npm package aliased-email for easily adding aliases to emails, as timestamp by default or with custom aliases.

Notifications You must be signed in to change notification settings

mikikiv/aliased-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aliased-email

This lightweight npm package is used to easily generate a valid aliased email addressed. If a custom alias is not included in the function, a timestamp is used that is allowed in email configurations.

Install: npm i aliased-email

Example:

aliasedEmail("example@test.com", "an alias") 
// returns
"example+an.alias@test.com"

aliasedEmail("example@test.com")
// returns
"example+2024-01-01T12.34.56@test.com"

aliasedEmailObject("example@test.com")
// returns
{
  alias: "2024-01-01T12.34.56"
  aliasedEmail: "example+2024-01-01T12.34.56@test.com",
  createdAt: "2024-01-01T12:34:56.789Z",
  email: "example@test.com",
  error: false
}

About

npm package aliased-email for easily adding aliases to emails, as timestamp by default or with custom aliases.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published