-
Notifications
You must be signed in to change notification settings - Fork 263
Closed
Labels
type:bugA broken experienceA broken experience
Description
Describe the bug
I want to send an email to BCC recipients and as regular recipient to me.
If sender and recipient is the same Recipient object the API call results to
At least one recipient is not valid., Recipient '' is not resolved. All recipients must be resolved before a message can be submitted.
If sender and recipient are two differenc Recipient objects then the API call works
Expected behavior
Allows to assign to ToRecipients and From the same Recipient object
How to reproduce
Send an email with the following code:
var sender = new Recipient { EmailAddress = new EmailAddress { Address = "SENDER_EMAIL" } };
var message = new Message
{
ToRecipients = [sender],
BccRecipients = recipientList,
From = sender
};
FillMessage(message, item); // internal method to create body, ...
var request = new SendMailPostRequestBody
{
Message = message,
SaveToSentItems = true
};
await gsc.Users["REDACTED"].SendMail.PostAsync(request, cancellationToken: stoppingToken);
SDK Version
5.81.0
Latest version known to work for scenario above?
No response
Known Workarounds
var recipient = new Recipient { EmailAddress = new EmailAddress { Address = "SENDER_EMAIL" } };
var sender = new Recipient { EmailAddress = new EmailAddress { Address = "SENDER_EMAIL" } };
var message = new Message
{
ToRecipients = [recipient],
BccRecipients = recipientList,
From = sender
};
FillMessage(message, item); // internal method to create body, ...
var request = new SendMailPostRequestBody
{
Message = message,
SaveToSentItems = true
};
await gsc.Users["REDACTED"].SendMail.PostAsync(request, cancellationToken: stoppingToken);
Debug output
No response
Configuration
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
type:bugA broken experienceA broken experience