Skip to content

Commit

Permalink
removed redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
vtopc committed Dec 2, 2024
1 parent 63d3529 commit 1fefc0e
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ type Specific interface {
RecipientCount() int

// SetTemplate sets the name of a template stored via the template API.
// See https://documentation.mailgun.com/en/latest/user_manual.html#templating
// See https://documentation.mailgun.com/docs/mailgun/user-manual/sending-messages/#templates
SetTemplate(string)

// // TODO(v5): move to into Specific and uncomment:
// // TODO(v5):
// // AddRecipient appends a receiver to the To: header of a message.
// // It will return an error if the limit of recipients have been exceeded for this message
// AddRecipient(recipient string) error
Expand Down Expand Up @@ -406,23 +406,12 @@ func (m *plainMessage) AddCC(r string) {

func (m *mimeMessage) AddCC(_ string) {}

// AddBCC appends a receiver to the blind-carbon-copy header of a message.
func (m *Message) AddBCC(recipient string) {
m.Specific.AddBCC(recipient)
}

func (m *plainMessage) AddBCC(r string) {
m.bcc = append(m.bcc, r)
}

func (m *mimeMessage) AddBCC(_ string) {}

// SetHTML is a helper. If you're sending a message that isn't already MIME encoded, SetHtml() will arrange to bundle
// an HTML representation of your message in addition to your plain-text body.
func (m *Message) SetHTML(html string) {
m.Specific.SetHTML(html)
}

// Deprecated: use SetHTML instead.
//
// TODO(v5): remove this method
Expand All @@ -436,15 +425,9 @@ func (m *plainMessage) SetHTML(h string) {

func (m *mimeMessage) SetHTML(_ string) {}

// SetAmpHTML is a helper. If you're sending a message that isn't already MIME encoded, SetAMP() will arrange to bundle
// an AMP-For-Email representation of your message in addition to your html & plain-text content.
func (m *Message) SetAmpHTML(html string) {
m.Specific.SetAmpHTML(html)
}

// Deprecated: use SetAmpHTML instead.
func (m *Message) SetAMPHtml(html string) {
m.Specific.SetAmpHTML(html)
m.SetAmpHTML(html)
}

func (m *plainMessage) SetAmpHTML(h string) {
Expand All @@ -464,12 +447,6 @@ func (m *Message) AddTag(tag ...string) error {
return nil
}

// SetTemplate sets the name of a template stored via the template API.
// See https://documentation.mailgun.com/en/latest/user_manual.html#templating
func (m *Message) SetTemplate(t string) {
m.Specific.SetTemplate(t)
}

func (m *plainMessage) SetTemplate(t string) {
m.template = t
}
Expand Down Expand Up @@ -667,8 +644,6 @@ type SendableMessage interface {
RequireTLS() bool
SkipVerification() bool

RecipientCount() int

Specific
}

Expand Down

0 comments on commit 1fefc0e

Please sign in to comment.