Description

SetHeader sets a value to the given header field.

Examples

func (m *Message) SetHeaders(h map[string][]string) {
	for k, v := range h {
		m.SetHeader(k, v...)
	}
}

	m := NewMessage()
	m.SetAddressHeader("From", "[email protected]", "Señor From")
	m.SetHeader("To", m.FormatAddress("[email protected]", "Señor To"), "[email protected]")
	m.SetAddressHeader("Cc", "[email protected]", "A, B")
	m.SetAddressHeader("X-To", "[email protected]", "à, b")

	m.SetAddressHeader("X-To", "[email protected]", "à, b")
	m.SetDateHeader("X-Date", now())
	m.SetHeader("X-Date-2", m.FormatDate(now()))
	m.SetHeader("Subject", "¡Hola, señor!")
	m.SetHeaders(map[string][]string{

SetHeader is referenced in 5 repositories

github.com/go-gomail/gomail github.com/aiwuTech/devKit github.com/drone-plugins/drone-email

...