ekilirelay
v0.0.2
Published
ekilirelay is a free email sender package
Downloads
20
Maintainers
Readme
ekiliRelay SDK
Installation | JS
To get started with ekiliRelay
, download the SDK as a zip file or use npm to install and include it in your project.
Download the SDK from the button below: Download SDK
Npm
npm i ekilirelay;
Unzip the downloaded file.
Import the SDK into your project:
import EkiliRelay from '../path-to/sdk/js/ekiliRelay.js';
Using npm:
```javascript
import EkiliRelay from 'ekilirelay';
```
Usage | JS
After including the SDK, you can start using ekiliRelay
to send emails. Here's a quick example:
<script type="module">
const sendBtn = document.getElementById("send"); // Some button
import EkiliRelay from '../path-to/sdk/js/ekiliRelay.js'; // Importing EkiliRelay
// Initialize the SDK
const sdk = new EkiliRelay();
sendBtn.addEventListener("click", () => { // Listening to a click event
// Send an email
sdk.sendEmail('[email protected]', 'Test Subject', 'This is a test message.', 'From: [email protected]')
.then(response => {
if (response.status === 'success') {
console.log('Email sent successfully.');
} else {
console.log('Failed to send email: ' + response.message);
console.log(response);
}
})
.catch(error => {
console.log('Error:', error);
});
});
</script>