SELECT attr.type
FROM
MailFormat.forwardedHeadings => {
forwardedHeadings: MailFormat.ForwardedHeadings ← HeaderContents.ForwardedHeadingsFromAttr[h, attr.value].value;
IO.PutF[out, "ForwardedHeadings: %g\r", IO.rope[MailFormatAux.ExposeForwardedHeadings[forwardedHeadings, 1]]];
};
MailFormat.forwardedHeadings => out.PutRope["ForwardedHeadings: <<suppressed>>\r"];
MailFormat.copyRecipients => {
copyRecipients: MailFormat.CopyRecipients ¬ HeaderContents.CopyRecipientsFromAttr[h, attr.value].value;
IO.PutF1[out, "Cc: %g\r", [rope[RopeFromRNameList[copyRecipients, originName]]]];
};
MailFormat.blindCopyRecipients => {
blindCopyRecipients: MailFormat.BlindCopyRecipients ¬ HeaderContents.BlindCopyRecipientsFromAttr[h, attr.value].value;
IO.PutF1[out, "Bcc: %g\r", [rope[RopeFromRNameList[blindCopyRecipients, originName]]]];
};
MailFormat.subject => {
subject: MailFormat.Subject ¬ HeaderContents.SubjectFromAttr[h, attr.value].value;
IO.PutF1[out, "Subject: %g\r", [rope[FixUpSubjectLine[subject]]] ];
};
MailFormat.textAnnotation => {
textAnnotation: MailFormat.TextAnnotation ¬ HeaderContents.TextAnnotationFromAttr[h, attr.value].value;
needsNewLine: BOOL ¬ TRUE;
lenSub1: INT ~ textAnnotation.Length[]-1;
IF ( lenSub1 > 0 )
THEN {
ch: CHAR ~ textAnnotation.Fetch[lenSub1];
SELECT ch
FROM
'\r => needsNewLine ¬ FALSE;
'\l => textAnnotation ¬ textAnnotation.Substr[0, lenSub1];
ENDCASE;
};
IO.PutRope[out, textAnnotation];
IF needsNewLine THEN out.PutChar['\r];
date ¬ Rope.Match[pattern: "Date:*", object: textAnnotation, case: FALSE] OR Rope.Match[pattern: "*\rDate:*", object: textAnnotation, case: FALSE];
};
MailFormatExtraTypes.newTextAnnotation => {
textAnnotation: MailFormat.TextAnnotation ¬ HeaderContents.TextAnnotationFromAttr[h, attr.value].value;
textAnnotation ¬ CheckForDuplicateFields[textAnnotation];
IO.PutRope[out, textAnnotation];
IF ( textAnnotation.Length[] > 0 )
AND ( textAnnotation.Fetch[textAnnotation.Length[]-1] # '\r ) THEN out.PutChar['\r];
date ¬ Rope.Match[pattern: "Date:*", object: textAnnotation, case: FALSE] OR Rope.Match[pattern: "*\rDate:*", object: textAnnotation, case: FALSE];
};
MailFormat.primaryRecipients => {
primaryRecipients: MailFormat.PrimaryRecipients ¬ HeaderContents.PrimaryRecipientsFromAttr[h, attr.value].value;
IO.PutF1[out, "To: %g\r", [rope[RopeFromRNameList[primaryRecipients, originName]]]];
};
MailFormat.inReplyTo => {
inReplyTo: MailFormat.InReplyTo ¬ HeaderContents.InReplyToFromAttr[h, attr.value].value;
IO.PutF1[out, "In-Reply-To: %g\r", IO.rope[RopeFromIPMessageID[inReplyTo, 1]]];
};
MailFormat.autoforwarded => {
autoforwarded: MailFormat.Autoforwarded ¬ HeaderContents.AutoforwardedFromAttr[h, attr.value].value;
IO.PutF1[out, "Autoforwarded: %g\r", IO.bool[autoforwarded]];
};
MailFormat.importance => {
importance: MailFormat.Importance ¬ HeaderContents.ImportanceFromAttr[h, attr.value].value;
IO.PutF1[out, "Importance: %g\r", IO.rope[MailFormatAux.ExposeImportance[importance, 1]]];
};
MailFormat.obsoletes => {
obsoletes: MailFormat.Obsoletes ¬ HeaderContents.ObsoletesFromAttr[h, attr.value].value;
IO.PutF1[out, "Obsoletes: %g\r", IO.rope[RopeFromIPMessageIDList[obsoletes, 1]]];
};
MailFormat.authorizingUsers => {
authorizingUsers: MailFormat.AuthorizingUsers ¬ HeaderContents.AuthorizingUsersFromAttr[h, attr.value].value;
IO.PutF1[out, "From: %g\r", [rope[RopeFromRNameList[authorizingUsers, nullXNSName]]]];
};
MailFormat.expiryDate => {
expiryDate: MailFormat.ExpiryDate ¬ HeaderContents.ExpiryDateFromAttr[h, attr.value].value;
IO.PutF1[out, "Expiry-Date: %g\r", IO.time[BasicTime.FromNSTime[expiryDate]]];
};
MailFormat.crossReferences => {
crossReferences: MailFormat.CrossReferences ¬ HeaderContents.CrossReferencesFromAttr[h, attr.value].value;
IO.PutF1[out, "References: %g\r", IO.rope[RopeFromIPMessageIDList[crossReferences, 1]]];
};
MailFormat.sensitivity => {
sensitivity: MailFormat.Sensitivity ¬ HeaderContents.SensitivityFromAttr[h, attr.value].value;
IO.PutF1[out, "Sensitivity: %g\r", IO.rope[MailFormatAux.ExposeSensitivity[sensitivity, 1]]];
};
MailFormat.replyRequest => {
replyRequest: MailFormat.ReplyRequest ¬ HeaderContents.ReplyRequestFromAttr[h, attr.value].value;
IO.PutF1[out, "ReplyRequest: %g\r", IO.rope[RopeFromRNameList[replyRequest, originName]]];
};
MailFormat.immutable => {
immutable: MailFormat.Immutable ¬ HeaderContents.ImmutableFromAttr[h, attr.value].value;
IO.PutF1[out, "Immutable: %g\r", IO.rope[MailFormatAux.ExposeImmutable[immutable, 1]]];
};
MailFormat.messageID => {
messageID: MailFormat.MessageID ¬ HeaderContents.MessageIDFromAttr[h, attr.value].value;
IO.PutF1[out, "Message-ID: %g\r", IO.rope[RopeFromIPMessageID[messageID, 1]]];
possibleDate ¬ messageID.uniqueString;
};
MailFormat.replyBy => {
replyBy: MailFormat.ReplyBy ¬ HeaderContents.ReplyByFromAttr[h, attr.value].value;
IO.PutF1[out, "Reply-By: %g\r", IO.time[BasicTime.FromNSTime[replyBy]]];
};
MailFormat.replyToUsers => {
replyToUsers: MailFormat.ReplyToUsers ¬ HeaderContents.ReplyToUsersFromAttr[h, attr.value].value;
IO.PutF1[out, "Reply-To: %g\r", [rope[RopeFromRNameList[replyToUsers, originName]]]];
};
MailFormat.originator => {
originator: MailFormat.Originator ¬ HeaderContents.OriginatorFromAttr[h, attr.value].value;
IO.PutF1[out, "Sender: %g\r", [rope[RopeFromRName[originator, nullXNSName]]]];
};
116, 117 => NULL; -- known to be uninteresting, 116 is NOT a string
MailFormatExtraTypes.bodyAnnotationSize => {
-- ExpiryDateFromAttr return CARD32
bodyAnnotSize ¬ HeaderContents.ExpiryDateFromAttr[h, attr.value].value;
};
MailFormatExtraTypes.tiogaPlainText =>
plainText ¬ HeaderContents.TextAnnotationFromAttr[h, attr.value].value;
MailFormatExtraTypes.tiogaFormatting =>
formatting ¬ HeaderContents.TextAnnotationFromAttr[h, attr.value].value;
ENDCASE => {
-- treat value as string, but be cautious
string: MailFormat.TextAnnotation;
string ¬ HeaderContents.TextAnnotationFromAttr[h, attr.value
! IO.Error, IO.EndOfStream => GOTO noGood].value;
IF string.Length[] # 0 THEN
IO.PutF[out, "Header-Attribute-%g: %g\r", IO.card[attr.type], IO.rope[string]];
EXITS noGood => NULL;
};