Present the system mail composer with recipients, a body, and attachments.
Inject IMailer and pass it a MailContent value:
The composer is the system MFMailComposeViewController. Its task completes when the composer is dismissed, with a MailResult of Sent, Saved, Cancelled, or Failed. Canceling is not an error, so handle Cancelled as a no-op.
CanSendMail is false when no Mail account is configured and always in the simulator. Composing while it is false throws InvalidOperationException, so gate the action on it or fall back to another contact path:
Recipients
To, Cc, and Bcc are address lists. UIKit silently drops addresses it cannot parse, so invalid entries do not throw.
Attachments
Add a MailAttachment per file. The MIME type tells the recipient's client how to open it, and the file name includes the extension:
Keep attachments small; many mail providers reject messages over roughly 20 MB. The data is copied into the message, so the source can be released after composing.
IMailer is registered with the other built-in services described in application setup and DI, but can also be accessed from any custom view through its protected Mailer property.