yaac_backend_mail

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_ERR = "Error: %v"

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendMail

type BackendMail struct {
	MVVM mvvm
	// contains filtered or unexported fields
}

func New

func New(mvvm mvvm, serverAddr string, username string, password string) (*BackendMail, error)

Create a new backend_mail struct Paramter: mvvm, serverAddress, username, password returns an error if it is not possible to connect and login to the server

func (*BackendMail) CheckMailConnection

func (b *BackendMail) CheckMailConnection() bool

Checks the mail connection to the server and the login credentials. Returns true if the connection and authentication is fine otherwise false

func (*BackendMail) GetMailsToday

func (b *BackendMail) GetMailsToday() ([]MailData, error)

GetMailsToday fetches all unread mails from today and checks the mails with the subject containing "Anwesenheitsliste". It extracts the attached image as binary data.

Returns an array with the maildata from the mails. It marks the returned mails as read.

type MailData

type MailData struct {
	Image      []byte
	ReceivedAt time.Time
	ID         uint32
}

Jump to

Keyboard shortcuts

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