All Projects → bkonetzny → link-to-inbox

bkonetzny / link-to-inbox

Licence: MIT license
Creates a link to the webmail inbox based on email address.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to link-to-inbox

squirrelmail
🌰️🐿️ SquirrelMail GitHub Repository (PHP 7-OK!)
Stars: ✭ 42 (-54.84%)
Mutual labels:  webmail-inbox

link-to-inbox

Creates a link to the webmail inbox based on email address.

Install

npm install link-to-inbox

Usage

Get the HTML link tag

Without filters

var link = linkToInbox.createLink('[email protected]');
// '<a href="https://mail.google.com/mail/u/0/" target="_blank">Check your Gmail inbox</a>'

With filters

var link = linkToInbox.createLink('[email protected]', {subject: 'Confirm your account'});
// '<a href="https://mail.google.com/mail/u/0/#search/in%3Aanywhere+subject%3A%Confirm%252520your%252520account%22" target="_blank">Check your Gmail inbox</a>'

With custom link text

var link = linkToInbox.createLink('[email protected]', {subject: 'Confirm your account'}, 'Open in %s');
// '<a href="https://mail.google.com/mail/u/0/#search/in%3Aanywhere+subject%3A%Confirm%252520your%252520account%22" target="_blank">Open in Gmail</a>'

Just get the link

Without filters

var link = linkToInbox.getHref('[email protected]');
// 'https://mail.google.com/mail/u/0/'

With filters

var link = linkToInbox.getHref('[email protected]', {subject: 'Confirm your account'});
// 'https://mail.google.com/mail/u/0/#search/in%3Aanywhere+subject%3A%Confirm%252520your%252520account%22'

Credits

This JS module is based on the ideas in the following articles:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].