Le foto venivano zippate tutte in un unico allegato: oltre i 100 MB i servizi rifiutavano l'invio (MaxUploadSizeExceededException) e, costruendo tutto in RAM sul thread della UI, il dispositivo si bloccava. - Invio diviso in più email da massimo ~40 MB ciascuna - Zip scritti su disco una parte alla volta e caricati in streaming - Preparazione in background, avanzamento "parte X di N" - Richiesta se includere le foto, con il loro peso (default: solo i log) - Database inviato insieme al file -wal - Avviso subito se si è offline Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
37 lines
960 B
C#
37 lines
960 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace SteUp.Shared.Core.Dto;
|
|
|
|
public class SendEmailDto
|
|
{
|
|
[JsonPropertyName("from")]
|
|
public string? From { get; set; }
|
|
|
|
[JsonPropertyName("fromName")]
|
|
public string? FromName { get; set; }
|
|
|
|
[JsonPropertyName("to")]
|
|
public string? To { get; set; }
|
|
|
|
[JsonPropertyName("subject")]
|
|
public string? Subject { get; set; }
|
|
|
|
[JsonPropertyName("msgText")]
|
|
public string? MsgText { get; set; }
|
|
|
|
[JsonPropertyName("html")]
|
|
public bool IsHtml { get; set; }
|
|
|
|
// Gli allegati viaggiano come parti multipart "allegati", non dentro il JSON della richiesta.
|
|
[JsonIgnore]
|
|
public List<AttachmentsDto>? Attachments { get; set; }
|
|
|
|
public class AttachmentsDto
|
|
{
|
|
public string FileName { get; set; } = string.Empty;
|
|
|
|
// Il file resta su disco e viene letto in streaming durante l'upload.
|
|
public string FilePath { get; set; } = string.Empty;
|
|
}
|
|
}
|