mails

package
v0.0.0-...-151ce6e Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SAUVEGARDE_MAILS = "acve@alwaysdata.net"
	UNSUBSCRIBE      = "contact@acve.asso.fr"
)

Variables

View Source
var (
	FuncMap = template.FuncMap{
		"safe": func(s string) template.HTML { return template.HTML(s) },
	}
)

Functions

func InitTemplates

func InitTemplates(ressourcesPath string)

InitTemplates charge les templates depuis le dossier donné par `ressourcesPath`

func NewAccuseReceptionSimple

func NewAccuseReceptionSimple(camp rd.Camp, contact Contact) (string, error)

func NewDebloqueFicheSanitaire

func NewDebloqueFicheSanitaire(urlDebloqueFicheSanitaire, newMail, nomPrenom string) (string, error)

func NewInviteEquipier

func NewInviteEquipier(camp rd.Camp, directeur string, equipier rd.Personne, lienForumaire string) (string, error)

func NewNotifFusion

func NewNotifFusion(contact Contact, lienEspacePerso string) (string, error)

func NewNotificationDon

func NewNotificationDon(contact Contact, montant rd.Euros) (string, error)

func NewNotifieDirecteur

func NewNotifieDirecteur(directeur Contact, participants []Participant, responsable Responsable,
	infoLines []string, labelCamp string) (string, error)

paramsNotifieDirecteur est à compléter

func NewNotifieEnvoiDocs

func NewNotifieEnvoiDocs(camp rd.Camp) (string, error)

func NewNotifieMessage

func NewNotifieMessage(contact Contact, title, contenu, lienEspacePerso string) (string, error)

func NewPreinscription

func NewPreinscription(mail string, resp []TargetRespo) (string, error)

func NewRenvoieLienEspacePerso

func NewRenvoieLienEspacePerso(mail string, dossiers []ResumeDossier) (string, error)

func NewValideMail

func NewValideMail(urlValideInscription string, contact Contact) (string, error)

Types

type Contact

type Contact struct {
	Prenom string
	Sexe   rd.Sexe
}

func (Contact) Salutations

func (c Contact) Salutations() string

type CustomReplyTo

type CustomReplyTo string

type DetailsParticipant

type DetailsParticipant struct {
	Participant
	Attente            rd.ListeAttente
	Groupe             string
	NeedFicheSanitaire bool
}

type MailRenderer

type MailRenderer interface {
	Render(messagePerso string) (string, error)
}

type Mailer

type Mailer interface {
	SendMail(to, subject, htmlBody string, ccs []string, replyTo ReplyTo) (err error)
}

func NewMailer

func NewMailer(smtp logs.SMTP) Mailer

type Participant

type Participant struct {
	NomPrenom, Sexe string
	Prenom          string
	DateNaissance   rd.Date
	LabelCamp       string
}

type PieceJointe

type PieceJointe struct {
	Content  []byte
	Filename string
}

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

Pool est une interface pour envoyer plusieurs mails consécutivement

func NewPool

func NewPool(credences logs.SMTP, pjs []PieceJointe) (Pool, error)

NewPool crée une interface pour envoyer plusieurs fois un mail avec les mêmes pièces jointes. Utiliser `SendMail` (plusieurs fois) puis `Close` (une fois)

func (Pool) Close

func (p Pool) Close()

func (Pool) SendMail

func (p Pool) SendMail(to, subject, htmlBody string, ccs []string, replyTo ReplyTo) error

type ReplyTo

type ReplyTo interface {
	// contains filtered or unexported methods
}
var DefaultReplyTo ReplyTo = defaultReplyTo{}

Utilise l'adresse fournie par les crédences

type Responsable

type Responsable struct {
	Contact
	Mail, Tels string
}

type ResumeDossier

type ResumeDossier struct {
	Responsable rd.BasePersonne
	Lien        string
	CampsMap    rd.Camps
}

func (ResumeDossier) Camps

func (r ResumeDossier) Camps() string

type TargetRespo

type TargetRespo struct {
	Lien, NomPrenom string
}

Jump to

Keyboard shortcuts

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