encodeHeaderValue static method
String
encodeHeaderValue(
- String value, [
- TransferEncoding transferEncoding = TransferEncoding.quotedPrintable
Encodes the specified header value.
Specify the transferEncoding when not the default quoted-printable
transfer encoding should be used.
Implementation
static String encodeHeaderValue(
String value, [
TransferEncoding transferEncoding = TransferEncoding.quotedPrintable,
]) {
switch (transferEncoding) {
case TransferEncoding.quotedPrintable:
return MailCodec.quotedPrintable.encodeHeader(value);
case TransferEncoding.base64:
return MailCodec.base64.encodeHeader(value);
default:
return value;
}
}