sendMessageText method
Future<SmtpResponse>
sendMessageText(
- String text,
- MailAddress from,
- List<
MailAddress> recipients, { - bool use8BitEncoding = false,
Sends the specified message text
from
to the recipients
.
In contrast to the other methods the text is not modified apart from the padding of <CR><LF>.<CR><LF>
sequences.
Set use8BitEncoding
to true
for sending a UTF-8 encoded message body.
Implementation
Future<SmtpResponse> sendMessageText(
String text, MailAddress from, List<MailAddress> recipients,
{bool use8BitEncoding = false}) {
if (recipients.isEmpty) {
throw SmtpException(this, SmtpResponse(['500 no recipients']));
}
return sendCommand(SmtpSendMailTextCommand(
text, use8BitEncoding, from, recipients.map((r) => r.email).toList()));
}