https://github.com/mariomarroquim/recovermail.js
JavaScript to capture user-entered emails and send them to an endpoint
https://github.com/mariomarroquim/recovermail.js
email-notification email-sender javascript javascript-library
Last synced: 6 months ago
JSON representation
JavaScript to capture user-entered emails and send them to an endpoint
- Host: GitHub
- URL: https://github.com/mariomarroquim/recovermail.js
- Owner: mariomarroquim
- License: mit
- Created: 2024-07-31T17:22:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-31T18:18:52.000Z (about 1 year ago)
- Last Synced: 2025-02-13T03:54:14.193Z (8 months ago)
- Topics: email-notification, email-sender, javascript, javascript-library
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Recovermail.js
JavaScript to capture user-entered emails and send them to an endpoint.
## Overview
`recovermail.js` is a JavaScript tool designed to capture email addresses entered by users in any visible text fields on an HTML page. It sends the detected emails along with the full URL of the current page to a specified external endpoint via a user-defined request method (GET or POST). The tool includes a user-configurable retry on timeout/error feature to ensure reliable data transmission.
## Usefulness
This script is ideal for businesses needing to capture and process email addresses entered by users on their website. It automates email collection for purposes such as newsletter sign-ups, contact forms, user feedback, marketing campaigns, and shopping cart recovery. The script ensures reliable data transmission with a retry on timeout/error mechanism, prevents duplicate submissions and reduces the risk of lost information.
## Usage
### Include the Script
To use `recovermail.js`, include it in your HTML page with the necessary `data` attributes for configuration.
```html
Capture Emails
```
### Configure the Script data attributes
- data-endpoint: The URL to which the detected emails and page URL will be sent.
- data-retries: The maximum number of retry attempts for failed requests (default: 3).
- data-timeout: The timeout duration in milliseconds for the request (default: 5000 ms).
- data-method: The HTTP method to use for the request (GET or POST, default: POST).#### In the example above:
The script will send emails to https://example.com/collectEmails.
It will retry up to 3 times for failed requests.
Each request will timeout if it takes longer than 5000 milliseconds.
The request method will be POST.## Support
You can contact me at mariomarroquim@gmail.com.