|
@@ -194,6 +194,10 @@ func (e *Email) Send(addr string, a smtp.Auth) error {
|
|
|
// Merge the To, Cc, and Bcc fields
|
|
|
to := make([]string, 0, len(e.To)+len(e.Cc)+len(e.Bcc))
|
|
|
to = append(append(append(to, e.To...), e.Cc...), e.Bcc...)
|
|
|
+ for i := 0; i < len(to); i++ {
|
|
|
+ addr, _ := mail.ParseAddress(to[i])
|
|
|
+ to[i] = addr.Address
|
|
|
+ }
|
|
|
// Check to make sure there is at least one recipient and one "From" address
|
|
|
if e.From == "" || len(to) == 0 {
|
|
|
return errors.New("Must specify at least one From address and one To address")
|