email

package
v0.0.0-...-966ca34 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: GPL-2.0, GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package email is a local package and implements functions to send a notification email given the `gspread.RecipientStruct` structure.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReturnATwoWordName

func ReturnATwoWordName(s string) string

ReturnATwoWordName uses the strings package to transform a string value in a []string and then join it again with just the first and the second string.

Example
n := ReturnATwoWordName("Gabriel Toshio Omiya")
fmt.Println("With three words:", n)

n = ReturnATwoWordName("Gabriel Toshio")
fmt.Println("With two words:", n)

n = ReturnATwoWordName("Gabriel")
fmt.Println("With one word:", n)
Output:

With three words: Gabriel Toshio
With two words: Gabriel Toshio
With one word: Gabriel

func SendEmail

func SendEmail(r gspread.RecipientStruct, credentials gspread.CredentialStruct) error

SendEmail send an email to the recipient notifying the difference between the current number of upcoming competitions and the obsolete number.

Types

type EmailData

type EmailData struct {
	// The end propertie in the header image URI
	// witch is responsible by the language
	HeaderImageName string

	// The recipient structure
	Recipient gspread.RecipientStruct

	// The name witch returned from the
	// ReturnATwoWordName function
	RecipientName string
}

EmailData is the structure for the template can fill the variables

Jump to

Keyboard shortcuts

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