(t *testing.T)
| 339 | } |
| 340 | |
| 341 | func TestComposeMultipartMessageWithCC(t *testing.T) { |
| 342 | raw, err := ComposeMultipartMessage( |
| 343 | "bot@example.com", |
| 344 | []string{"alice@gmail.com"}, |
| 345 | []string{"bob@gmail.com", "carol@gmail.com"}, |
| 346 | "Hello", "Plain", "<p>HTML</p>", |
| 347 | "", nil, "relay.e2a.dev", "", "", |
| 348 | ) |
| 349 | if err != nil { |
| 350 | t.Fatalf("ComposeMultipartMessage failed: %v", err) |
| 351 | } |
| 352 | |
| 353 | msg, _ := mail.ReadMessage(strings.NewReader(string(raw))) |
| 354 | if got := msg.Header.Get("Cc"); got != "bob@gmail.com, carol@gmail.com" { |
| 355 | t.Errorf("Cc = %q, want bob@gmail.com, carol@gmail.com", got) |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | func TestComposeMultipartMessageConversationIDHeader(t *testing.T) { |
| 360 | raw, err := ComposeMultipartMessage( |
nothing calls this directly
no test coverage detected