lib/app/outgoingemail-helpers.go

24 lines
830 B
Go
Raw Normal View History

2021-01-14 06:36:35 +00:00
package app
import "code.tnxs.net/taxnexus/lib/api/workflow/workflow_models"
2021-01-18 03:13:54 +00:00
// UnMarshalSwaggerOutgoingEmailMessage decodes swagger to first class object
2021-01-17 21:49:00 +00:00
func UnMarshalSwaggerOutgoingEmailMessage(s *workflow_models.OutgoingEmailMessage) *OutgoingEmailMessage {
2021-01-14 06:36:35 +00:00
return &OutgoingEmailMessage{
ID: s.ID,
BCCAddress: s.BCCAddress,
CCAddress: s.CCAddress,
EmailTemplateID: s.EmailTemplateID,
ExternalID: s.ExternalID,
HTML: []byte(s.HTML),
EmailMessageID: s.EmailMessageID,
FromContactID: s.FromContactID,
FromName: s.FromName,
Subject: s.Subject,
Text: s.Text,
ToAddress: s.ToAddress,
ValidatedFromAddress: s.ValidatedFromAddress,
WhoID: s.WhoID,
}
}