package com.mailserver.dto; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; /** * "Send" from the web client. {@code to} and {@code cc}: one or more addresses separated by commas, semicolons or * spaces. {@code draftId}: the draft being sent — its attachments go with the message, the draft is removed. */ public class SendRequest { @NotBlank @Size(max = 5000) private String to; @Size(max = 5000) private String cc; @Size(max = 1000) private String subject; @Size(max = 1_000_000) private String body; private boolean html = false; private Long draftId; public String getTo() { return to; } public void setTo(String to) { this.to = to; } public String getCc() { return cc; } public void setCc(String cc) { this.cc = cc; } public String getSubject() { return subject == null ? "" : subject; } public void setSubject(String subject) { this.subject = subject; } public String getBody() { return body == null ? "" : body; } public void setBody(String body) { this.body = body; } public boolean isHtml() { return html; } public void setHtml(boolean html) { this.html = html; } public Long getDraftId() { return draftId; } public void setDraftId(Long draftId) { this.draftId = draftId; } }