(t *testing.T)
| 230 | } |
| 231 | |
| 232 | func TestComposeMessageReplyTo(t *testing.T) { |
| 233 | raw, err := ComposeMessage( |
| 234 | "from@test.com", []string{"to@test.com"}, nil, "Re: Hello", "Reply body", |
| 235 | "text/plain", "<original-msg-id@example.com>", nil, "test.dev", "", "", |
| 236 | ) |
| 237 | if err != nil { |
| 238 | t.Fatalf("ComposeMessage failed: %v", err) |
| 239 | } |
| 240 | |
| 241 | msg, _ := mail.ReadMessage(strings.NewReader(string(raw))) |
| 242 | if got := msg.Header.Get("In-Reply-To"); got != "<original-msg-id@example.com>" { |
| 243 | t.Errorf("In-Reply-To = %q, want <original-msg-id@example.com>", got) |
| 244 | } |
| 245 | if got := msg.Header.Get("References"); got != "<original-msg-id@example.com>" { |
| 246 | t.Errorf("References = %q, want <original-msg-id@example.com>", got) |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | func TestComposeMessageNoReplyTo(t *testing.T) { |
| 251 | raw, err := ComposeMessage("from@test.com", []string{"to@test.com"}, nil, "Sub", "Body", "", "", nil, "test.dev", "", "") |
nothing calls this directly
no test coverage detected