mirror of https://github.com/adamdruppe/arsd.git
ketmar base64 encoded body
This commit is contained in:
parent
06e3d82803
commit
c4d9ade586
9
email.d
9
email.d
|
@ -699,6 +699,15 @@ class IncomingEmailMessage {
|
|||
if(htmlMessageBody.length)
|
||||
htmlMessageBody = convertToUtf8Lossy(decodeQuotedPrintable(htmlMessageBody), charset);
|
||||
break;
|
||||
case "base64":
|
||||
if(textMessageBody.length) {
|
||||
// alas, phobos' base64 decoder cannot accept ranges, so we have to allocate here
|
||||
char[] mmb;
|
||||
mmb.reserve(textMessageBody.length);
|
||||
foreach (char ch; textMessageBody) if (ch > ' ' && ch < 127) mmb ~= ch;
|
||||
textMessageBody = convertToUtf8Lossy(Base64.decode(mmb), charset);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// nothing needed
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue