diff --git a/msg_test.go b/msg_test.go index ed70a73..14178e8 100644 --- a/msg_test.go +++ b/msg_test.go @@ -617,7 +617,7 @@ func TestMsg_SetMessageIDWithValue(t *testing.T) { } } -// TestMsg_FromFormat tests the FromFormat() method for the Msg object +// TestMsg_FromFormat tests the FromFormat and EnvelopeFrom methods for the Msg object func TestMsg_FromFormat(t *testing.T) { tests := []struct { tname string @@ -641,6 +641,10 @@ func TestMsg_FromFormat(t *testing.T) { t.Errorf("failed to FromFormat(): %s", err) return } + if err := m.EnvelopeFromFormat(tt.name, tt.addr); err != nil && !tt.fail { + t.Errorf("failed to EnvelopeFromFormat(): %s", err) + return + } var fa *mail.Address f, ok := m.addrHeader[HeaderFrom]