email

package
Version: v0.0.0-...-4312bc8 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL