feat(email): add delivery adapters
CI and Deploy / test (pull_request) Failing after 1m37s
CI and Deploy / deploy (pull_request) Has been skipped

Gmail and Graph request explicit send consent and classify provider rejection separately from uncertain transport failure. IMAP remains read-only; no send API is exposed.
This commit is contained in:
cesnimda
2026-08-09 23:47:21 +02:00
parent 429f427f49
commit e9937accd8
11 changed files with 331 additions and 9 deletions
+5 -2
View File
@@ -12,7 +12,7 @@ public sealed class EmailControllerTests
[Fact]
public async Task Provider_status_is_owner_scoped_and_does_not_claim_send_support()
{
var gmail = new FakeProvider("gmail", new EmailConnectionInfo("gmail", "owner@gmail.test"));
var gmail = new FakeProvider("gmail", new EmailConnectionInfo("gmail", "owner@gmail.test", CanSend: true));
var outlook = new FakeProvider("microsoft", null);
var controller = CreateController(gmail, outlook);
@@ -27,7 +27,7 @@ public sealed class EmailControllerTests
Assert.Equal("Gmail", status.DisplayName);
Assert.True(status.Connected);
Assert.True(status.CanRead);
Assert.False(status.CanSend);
Assert.True(status.CanSend);
},
status =>
{
@@ -113,5 +113,8 @@ public sealed class EmailControllerTests
Array.Empty<string>(),
Array.Empty<EmailAttachmentRef>()));
}
public Task<EmailDeliveryResult> SendAsync(string ownerUserId, EmailDeliveryRequest request, CancellationToken cancellationToken) =>
Task.FromResult(new EmailDeliveryResult("message-1", "thread-1"));
}
}