model

package
v0.0.0-...-f15359f Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MaxFileSize = 10

MaxFileSize is Attachment max size (MB)

Variables

This section is empty.

Functions

This section is empty.

Types

type Form

type Form struct {
	To      string `json:"to"`
	CC      string `json:"cc"`
	BCC     string `json:"bcc"`
	Subject string `json:"subject"`
	Body    string `json:"body"`
}

Form is creatd by http post x-www-form-urlencoded

type GaeMail

type GaeMail struct {
	Ctx         context.Context
	To          string `json:"to"`
	CC          string `json:"cc"`
	BCC         string `json:"bcc"`
	Subject     string `json:"subject"`
	Body        string `json:"body"`
	Attachments []mail.Attachment
}

GaeMail store the mail infos

func (*GaeMail) Send

func (gaeMail *GaeMail) Send() (err error)

Send will send mail

type UploadToAttachment

type UploadToAttachment struct {
	UploadFile   multipart.File
	UploadHeader *multipart.FileHeader
	Attachment   mail.Attachment
}

UploadToAttachment to change upload file to attachment

func (*UploadToAttachment) Change

func (u *UploadToAttachment) Change() (err error)

Change is main code

Jump to

Keyboard shortcuts

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