Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/otherwa/epatra
Your Own Mail Service
https://github.com/otherwa/epatra
expressjs node nodemailer-smtp-transport webapp
Last synced: about 1 month ago
JSON representation
Your Own Mail Service
- Host: GitHub
- URL: https://github.com/otherwa/epatra
- Owner: Otherwa
- Created: 2022-11-26T10:50:32.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-28T16:52:30.000Z (10 months ago)
- Last Synced: 2024-05-01T19:31:40.595Z (8 months ago)
- Topics: expressjs, node, nodemailer-smtp-transport, webapp
- Language: JavaScript
- Homepage: https://combative-erin-wig.cyclic.cloud/
- Size: 7 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Epatra 📨
Epatra Email Sender is a Node.js application that uses the Nodemailer library to send emails via Gmail's SMTP server.
## Prerequisites
Before you begin, ensure you have met the following requirements:
- Node.js installed on your local machine.
- A Gmail account for sending emails.
- Enable "Less secure apps" on your Gmail account. (Note: This is not recommended for production use. Consider using OAuth2 for secure authentication.)## Installation
1. Clone this repository to your local machine:
```bash
git clone https://github.com/yourusername/epatra-email-sender.git
```2. Navigate to the project directory:
```bash
cd epatra-email-sender
```3. Install the required dependencies:
```bash
npm install
```4. Create a `.env` file in the project root and configure your Gmail email and password:
```env
[email protected]
PASSWORD=your_password
```## Usage
You can use the `sendmail` function from this application to send emails programmatically. Here's an example of how to use it:
```javascript
const { sendmail } = require("./epatra-email-sender");const to = "[email protected]";
const subject = "Hello, World!";
const text = "This is a test email sent from Epatra Email Sender.";
const message = "This is a test email sent from Epatra Email Sender.
";sendmail(to, subject, text, message)
.then(() => {
console.log("Email sent successfully!");
})
.catch((error) => {
console.error("Error sending email:", error);
});
```## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
## Acknowledgments
- Nodemailer: https://nodemailer.com/
```Make sure to replace the placeholder values (e.g., `yourusername`, `[email protected]`, and `your_password`) with your actual information. Additionally, consider providing more details about your project, such as its purpose, features, and any additional configuration options.