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 ¶
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
Click to show internal directories.
Click to hide internal directories.