Skip to content

Dark-Actions/resend-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📧 Doitall Resend Example

A lightweight CLI application written in Go for sending emails using the Resend API. Perfect for quick email notification integrations in Go projects.

🌐 English | Español


✨ Features

  • 📤 Send emails via Resend API
  • 🔧 Support for multiple recipients (repeatable -m flag)
  • 🔐 Environment variables loaded from .env file
  • ⚡ Lightweight and easy to use

📋 Prerequisites

  • Go 1.21 or higher
  • A Resend account with a valid API Key
  • A verified domain in Resend (to send to real email addresses)

🚀 Installation

  1. Clone the repository:
git clone https://github.com/Dark-Actions/doitall-resend-example.git
cd doitall-resend-example
  1. Install dependencies:
go mod download

⚙️ Configuration

  1. Copy the example file and configure your API Key:
cp .env.example .env
  1. Edit the .env file and add your Resend API Key:
RESEND_API_KEY=re_your_api_key_here

🔑 Get your API Key from the Resend dashboard

📝 Usage

Build and run

go build -o doitall-mail
./doitall-mail -m "recipient@example.com"

Run directly

go run main.go -m "recipient@example.com"

Send to multiple recipients

go run main.go -m "user1@example.com" -m "user2@example.com"

🏗️ Project Structure

.
├── main.go           # Application entry point
├── go.mod            # Go module and dependencies
├── go.sum            # Dependency checksums
├── .env              # Environment variables (do not commit)
├── .env.example      # Example environment variables
└── README.md         # This file

🛠️ Customization

To modify the email content, edit the fields in main.go:

params := &resend.SendEmailRequest{
    From:    "your-email@domain.com",  // Verified sender
    To:      toMails,
    Subject: "Your custom subject",
    Html:    "<h1>Your HTML content</h1>",
}

📦 Dependencies

Package Version Description
resend-go v2.28.0 Official Resend client for Go
godotenv v1.5.1 Load environment variables from .env

👥 About

This is an open source project by Dark-Actions.

📄 License

This project is open source. Feel free to use and modify it according to your needs.


Made with ❤️ by Dark-Actions


🇪🇸 Español

Aplicación CLI ligera escrita en Go para enviar correos electrónicos utilizando la API de Resend. Perfecta para integraciones rápidas de notificaciones por email en proyectos Go.

✨ Características

  • 📤 Envío de correos mediante la API de Resend
  • 🔧 Soporte para múltiples destinatarios (flag -m repetible)
  • 🔐 Carga de variables de entorno desde archivo .env
  • ⚡ Ligero y fácil de usar

📋 Requisitos Previos

  • Go 1.21 o superior
  • Una cuenta en Resend con API Key válida
  • Dominio verificado en Resend (para enviar a correos reales)

🚀 Instalación

git clone https://github.com/Dark-Actions/doitall-resend-example.git
cd doitall-resend-example
go mod download

⚙️ Configuración

cp .env.example .env
# Edita .env y agrega tu RESEND_API_KEY

📝 Uso

# Compilar y ejecutar
go build -o doitall-mail
./doitall-mail -m "destinatario@ejemplo.com"

# Ejecutar directamente
go run main.go -m "destinatario@ejemplo.com"

# Múltiples destinatarios
go run main.go -m "usuario1@ejemplo.com" -m "usuario2@ejemplo.com"

👥 Acerca de

Este es un proyecto de código abierto de Dark-Actions.


Hecho con ❤️ por Dark-Actions

About

Ejemplo de sistema de correos en Go usando Resend

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages