Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachments ¶
type Attachments struct {
ID string `json:"id"`
}
Attachments represents a reference to an attachment
type EmailContainer ¶
type EmailContainer struct {
Mailbox *models.Mailbox
Email *models.Email
Attachments []*models.EmailAttachment
}
EmailContainer holds all the data needed to send an email
type EmailsHandler ¶
type EmailsHandler struct {
// contains filtered or unexported fields
}
func NewEmailsHandler ¶
func NewEmailsHandler(repos *repository.Repositories) *EmailsHandler
func (*EmailsHandler) Reply ¶
func (h *EmailsHandler) Reply() gin.HandlerFunc
reply to an existing email thread
func (*EmailsHandler) Send ¶
func (h *EmailsHandler) Send() gin.HandlerFunc
Send handles the HTTP request to send a new email
func (*EmailsHandler) ValidateReplyRequest ¶
func (h *EmailsHandler) ValidateReplyRequest(ctx context.Context, request *ReplyEmailRequest) *custom_err.MultiErrors
type ReplyEmailRequest ¶
type ReplyEmailRequest struct {
ReplyTo string `json:"replyTo"`
Body EmailBody `json:"body"`
Attachments []Attachments `json:"attachments"`
ScheduleFor time.Time `json:"scheduleFor"`
}
type SendEmailRequest ¶
type SendEmailRequest struct {
MailboxID string `json:"mailboxId"`
FromAddress string `json:"fromAddress"`
FromName string `json:"fromName"`
ToAddresses []string `json:"toAddresses"`
CCAddresses []string `json:"ccAddresses"`
BCCAddresses []string `json:"bccAddresses"`
ReplyTo string `json:"replyTo"`
Subject string `json:"subject"`
Body EmailBody `json:"body"`
Attachments []Attachments `json:"attachments"`
ScheduleFor time.Time `json:"scheduleFor"`
}
SendEmailRequest represents the API request for sending an email
Click to show internal directories.
Click to hide internal directories.