(t *testing.T)
| 124 | } |
| 125 | |
| 126 | func TestComposeMessageASCIISubjectUnchanged(t *testing.T) { |
| 127 | // Pure-ASCII subjects should pass through without encoded-word wrapping. |
| 128 | raw, err := ComposeMessage( |
| 129 | "from@test.com", []string{"to@test.com"}, nil, |
| 130 | "Hello Alice", "Body", "text/plain", "", nil, "test.dev", "", "", |
| 131 | ) |
| 132 | if err != nil { |
| 133 | t.Fatalf("ComposeMessage failed: %v", err) |
| 134 | } |
| 135 | msg, _ := mail.ReadMessage(strings.NewReader(string(raw))) |
| 136 | if got := msg.Header.Get("Subject"); got != "Hello Alice" { |
| 137 | t.Errorf("Subject = %q, want Hello Alice (no encoded-word for ASCII)", got) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func TestComposeMessageMultipleRecipients(t *testing.T) { |
| 142 | raw, err := ComposeMessage( |
nothing calls this directly
no test coverage detected