attachData method
Attaches raw data as a file.
data is the file content as bytes.
name is the attachment filename.
mimeType is the MIME type of the attachment.
Implementation
@override
MailerInterface attachData(
List<int> data,
String name, {
String? mimeType,
}) {
_message.addAttachment(
MailAttachment(
data: data,
filename: name,
mimeType: mimeType ?? 'application/octet-stream',
),
);
return this;
}