<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.E-MailFormatvorlage19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="DE-CH" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Peter<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Here my proposal to include the date field in the mail header:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">PROCEDURE RFC5322Date(VAR s: ARRAY OF CHAR);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">VAR<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">x, t, d: LONGINT;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">m: ARRAY 40 OF CHAR;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">BEGIN<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> m := “JanFebMarAprMayJunJulAugSepOctNovDec“;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">s := “DD MMM 20YY hh:mm:ss +0200”;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> Oberon.GetClock(t, d);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> x := d MOD 32; s[0] := CHR(x DIV 10+ORD(“0”); s[1] := CHR(x MOD 10+ORD(“0”));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> x := (d DIV 32 MOD 16-1)*3; s[3] := m[x]; s[4] := m[x+1]; s[5] := m[x+2];<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> x := d DIV 512 MOD 100; s[9] := CHR(x DIV 10+ORD(“0”); s[10] := CHR(x MOD 10+ORD(“0”));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> x := t DIV 4096 MOD 32; s[12] := CHR(x DIV 10+ORD(“0”); s[13] := CHR(x MOD 10+ORD(“0”));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> x := t DIV 64 MOD 64; s[15] := CHR(x DIV 10+ORD(“0”); s[16] := CHR(x MOD 10+ORD(“0”));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> x := t MOD 64; s[18] := CHR(x DIV 10+ORD(“0”); s[19] := CHR(x MOD 10+ORD(“0”));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">END RFC5322Date;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">PROCEDURE SendText*(S: SMTPSession; head, body: Texts.Text; beg, end: LONGINT; cont: MIME.Content);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">VAR<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">enc: LONGINT;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> ascii: Texts.Text;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> dateTime: ARRAY 30 OF CHAR;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> BEGIN<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> enc := cont.encoding; cont.len := MAX(LONGINT);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> SendCmd(S,"From: ", S.from);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> RFC5322Date(dateTime);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> SendCmd(S, “Date:”, dateTime);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">SendCmd(S, "X-Mailer:", mailer);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">…<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">END SendText;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Jörg<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">Von:
</span></b><span style="font-size:12.0pt;color:black">Oberon <oberon-bounces@lists.inf.ethz.ch> im Auftrag von peter@easthope.ca <peter@easthope.ca><br>
<b>Datum: </b>Freitag, 12. Mai 2023 um 15:40<br>
<b>An: </b>oberon@lists.inf.ethz.ch <oberon@lists.inf.ethz.ch><br>
<b>Betreff: </b>[Oberon] Re (2): Copy a text buffer to a string?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">From: Paul Reed <paulreed@paddedcell.com><br>
Date: Fri, 12 May 2023 10:18:23 +0100<br>
> ... note the writer W seems to be in Oberon.Mail.Mod ostensibly for <br>
> logging, so it would be an abuse of that variable.<br>
<br>
Thanks for mentioning that. To continue with Text, I should declare <br>
another Writer.<br>
<br>
With SendCmd requiring an ARRAY OF CHAR and none of the existing code <br>
particularly relevant to the required objective, I decided to avoid <br>
Text and stick with characters. Will post the revision soon.<br>
<br>
Thanks for the feedback, ... P.L.<br>
<br>
- <br>
mobile: +1 778 951 5147<br>
VoIP: +1 604 670 0140<br>
sip:461697@sip.diamondcard.us<br>
<a href="https://en.wikibooks.org/wiki/User:PeterEasthope">https://en.wikibooks.org/wiki/User:PeterEasthope</a><br>
<br>
--<br>
Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems<br>
<a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><o:p></o:p></span></p>
</div>
</div>
</body>
</html>