I am using this code to find out how to send an email with the Graph client:
asposeClient = GraphClient.GetClient(new MsTokenProvider(auth, server.Address), auth.TenantId); var asposeMessage = new Aspose.Email.MailMessage(); asposeMessage.From = message.From; asposeMessage.To = message.To; asposeMessage.Subject = message.Subject; asposeMessage.Body = message.TextBody; var msg = MapiMessage.FromMailMessage(asposeMessage); asposeClient?.Send(msg);
It throws this error:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at ☼ .(MapiMessage )
at ☼ . ()
at . ?()
at .Send(MapiMessage )
Am I doing something wrong?