Skip to content
/ stun Public

This is a tool that helps you automate your mailing processes

License

Notifications You must be signed in to change notification settings

C-o-m-o-n/stun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stun: Go Email Automation Library

Go Report Card License

stun is a simple and flexible Go library for email automation. It provides a convenient way to send emails using the Go programming language.

Features

  • Basic Email Sending: Send plain text emails easily.
  • Environment Variable Support: Securely read email credentials from environment variables.
  • Configurable SMTP Server: Easily configure the SMTP server details.

Installation

go get github.com/C-o-m-o-n/stun

Usage

  • !) generated by chat gpt
package main

import (
	"github.com/C-o-m-o-n/stun"
)

func main() {
	// Create a new Email instance
	email := stun.NewEmail("recipient@example.com", "Test Subject", "This is the email body.")

	// Send the email
	err := email.Send()
	if err != nil {
		panic(err)
	}
}
  • !!) generated by Github copilot
  package main

import (
    "fmt"
    "testing"
)

func TestEmailSend(t *testing.T) {
    email := &Email{
        From:    "sender@gmail.com",
        To:      "receiver@gmail.com",
        Subject: "Test Email",
        Body:    "This is a test email.",
    }

    err := email.Send()
    if err != nil {
        t.Errorf("Failed to send email: %v", err)
    } else {
        fmt.Println("Email sent successfully")
    }
}

NOTE: They are probably not going to work

Contributing

Contributions are welcome! Please feel free to open issues or pull requests.

Steps

  1. First, fork the repo from my account
  • Learn how to fork a github repo from here
  1. Next, Clone the fork to your local machine
  • Learn how to clone a github repo fromhere
  1. Next, Add your changes, commit and push them to github
  • Learn how to push code to a github repo from here
  1. Next, open a pull request
  • Learn more about creating pull requests from here

NOTE: Don't be afriad to push your changes even if you think they maight have bugs. We will debug them together

Peace!!

About

This is a tool that helps you automate your mailing processes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages