cfb

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 8 Imported by: 0

README

contact-form-backend

Implementation of a contact form backend for Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(c Configuration) http.HandlerFunc

Types

type Configuration

type Configuration struct {
	To []string

	FromEmail    string
	FromPassword string

	SMTPHost string
	SMTPPort string

	Subject  string
	Template string

	ErrorLogging bool
}

type Error

type Error struct {
	Message string `json:"message"`
}

type Request

type Request struct {
	Name    string `json:"name"`
	Email   string `json:"email"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL