func (m mailjet) verifyParams() {
	if m.configs.PrivateKey == "" ||
		m.configs.PublicKey == "" {
		panic("gomailer: for mailjetapp you must provide PrivateKey and PublicKey in config")
	}
	if m.from.Email == "" {
		panic("gomailer: you must provide from")
	}
	if len(m.toList) <= 0 {
		panic("gomailer: you must provide at least one receipent")
	}
	if len(m.toList)+len(m.ccList)+len(m.bccList) > mailjetMaxReceipents {
		panic(fmt.Sprintf("mailer: total number of receipents including to/cc/bcc can not be greater than %d for mailjet", mailjetMaxReceipents))
	}
	if m.bodyText == "" && m.bodyHTML == "" {
		panic("gomailer: you must provide a Text or HTML body")
	}
}
verifyParams verify the required params
package gomailer
import (
	"bytes"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"os"
)
const (
	mailjetBaseURL = "https://api.mailjet.com/v3.1"
	mailjetMaxFileSize int64 = 15 * 1000000
	mailjetMaxReceipents = 50
)
type (
	mailjet struct {
		c                     client
		configs               Configs
		from                  mailjetAddress
		toList                []mailjetAddress
		ccList                []mailjetAddress
		bccList               []mailjetAddress
		replyTo               mailjetAddress
		subject               string
		bodyHTML              string
		bodyText              string
		attachmentFiles       []string
		attachmentInlineFiles []string
	}
	mailjetAddress struct {
		Name  string `json:"Name,omitempty"`
		Email string `json:"Email"`
	}
	mailjetAttachment struct {
		Name        string `json:"Filename"`
		Content     string `json:"Base64Content"`
		ContentType string `json:"ContentType"`
		ContentID   string `json:"ContentID,omitempty"`
	}
)
func (m *mailjet) messageURL() string {
	url := mailjetBaseURL
	if m.configs.BaseURL != "" {
		url = m.configs.BaseURL
	}
	return fmt.Sprintf("%s/send", url)
}
func (m *mailjet) From(name, from string) Mailer {
	m.from = mailjetAddress{Name: name, Email: from}
	return m
}
func (m *mailjet) To(name, to string) Mailer {
	m.toList = append(m.toList, mailjetAddress{Name: name, Email: to})
	return m
}
func (m *mailjet) Cc(name, to string) Mailer {
	m.ccList = append(m.ccList, mailjetAddress{Name: name, Email: to})
	return m
}
func (m *mailjet) Bcc(name, to string) Mailer {
	m.bccList = append(m.bccList, mailjetAddress{Name: name, Email: to})
	return m
}
func (m *mailjet) ReplyTo(name, email string) Mailer {
	m.replyTo = mailjetAddress{Name: name, Email: email}
	return m
}
func (m *mailjet) Subject(subject string) Mailer {
	m.subject = subject
	return m
}
func (m *mailjet) BodyHTML(body string) Mailer {
	m.bodyHTML = body
	return m
}
func (m *mailjet) BodyText(body string) Mailer {
	m.bodyText = body
	return m
}
func (m *mailjet) AttachmentFile(file string) Mailer {
	m.attachmentFiles = append(m.attachmentFiles, file)
	return m
}
func (m *mailjet) AttachmentInlineFile(file string) Mailer {
	m.attachmentInlineFiles = append(m.attachmentInlineFiles, file)
	return m
}
func (m *mailjet) AttachmentReader(file string, r io.Reader) Mailer {
	log.Println("gomailer: not implemented")
	return m
}
func (m *mailjet) AttachmentInlineReader(file string, r io.Reader) Mailer {
	log.Println("gomailer: not implemented")
	return m
}
func (m *mailjet) Send() error {
	m.verifyParams()
	var totalSize int64
	totalFiles := []string{}
	totalFiles = append(totalFiles, m.attachmentFiles...)
	totalFiles = append(totalFiles, m.attachmentFiles...)
	for _, f := range totalFiles {
		fi, e := os.Stat(f)
		if e != nil {
			return e
		}
		totalSize += fi.Size()
	}
	if totalSize > mailjetMaxFileSize {
		return errors.New("gomailer: max attachment size for mailjet is 15MB")
	}
	attachments := []mailjetAttachment{}
	for _, f := range m.attachmentFiles {
		a := attachment{}
		err := a.ReadFromFile(f)
		if err != nil {
			return err
		}
		attachments = append(attachments, mailjetAttachment{
			Name:        a.FileName,
			Content:     a.Content,
			ContentType: a.Type,
		})
	}
	inlinedAttachments := []mailjetAttachment{}
	for _, f := range m.attachmentInlineFiles {
		a := attachment{}
		err := a.ReadFromFile(f)
		if err != nil {
			return err
		}
		inlinedAttachments = append(inlinedAttachments, mailjetAttachment{
			Name:        a.FileName,
			Content:     a.Content,
			ContentType: a.Type,
			ContentID:   a.ContentID,
		})
	}
	params := mapData{
		"From":    m.from,
		"Subject": m.subject,
	}
	if len(m.toList) > 0 {
		params["To"] = m.toList
	}
	if len(m.ccList) > 0 {
		params["Cc"] = m.ccList
	}
	if len(m.bccList) > 0 {
		params["Bcc"] = m.bccList
	}
	if m.replyTo.Email != "" {
		params["ReplyTo"] = m.replyTo
	}
	if len(m.bodyText) > 0 {
		params["TextPart"] = m.bodyText
	}
	if len(m.bodyHTML) > 0 {
		params["HTMLPart"] = m.bodyHTML
	}
	if len(m.attachmentFiles) > 0 {
		params["Attachments"] = attachments
	}
	if len(m.attachmentInlineFiles) > 0 {
		params["InlinedAttachments"] = inlinedAttachments
	}
	body := struct {
		Messages []mapData `json:"Messages"`
	}{[]mapData{params}}
	return m.processMailjetRequest(body)
}