Documentation
¶
Index ¶
Constants ¶
View Source
const ( // The total upload limit allowed to upload file // attachments. UploadLimit = 5 )
Variables ¶
View Source
var ( // AllowedMimes represents the mime types permitted // to be attached to forms. AllowedMimes = []string{ "text/plain", "image/jpeg", "image/png", "image/svg+xml", "application/pdf", "application/msword", "application/vnd.ms-word.document.macroenabled.12", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/msword", } )
Functions ¶
Types ¶
type Attachment ¶
Attachment defines the mail file that has been uploaded via the forms endpoint. It contains useful information for sending files over the mail driver.
func (*Attachment) SizeMB ¶
func (a *Attachment) SizeMB() int
SizeMB
Returns the attachment file size in megabytes.
type Attachments ¶
type Attachments []Attachment
Attachments defines the slice of mail attachments
func (Attachments) ToMail ¶
func (a Attachments) ToMail() mail.Attachments
type Reader ¶
type Reader struct { Form *domain.Form Reader dynamicstruct.Reader StoragePath string }
func (*Reader) Values ¶
func (r *Reader) Values() (domain.FormValues, Attachments, error)
type Sender ¶
type Sender struct { Attachments []Attachment Fields domain.FormValues }
Click to show internal directories.
Click to hide internal directories.