- RcptLen = strlen(recipients);
- TRcptLen = strlen(thisrecp);
- TDsn = strlen(thisdsn);
- if ( RcptLen + TRcptLen + TDsn + 100
- < sizeof recipients) {
- if (!IsEmptyStr(recipients)) {
- // copy the \0 to be sure..
- memcpy (&recipients[RcptLen], "<br />\0", 7);
- RcptLen += 6;
+
+ if (!IsEmptyStr(thisrecp)) {
+ stresc(thismsg, sizeof thismsg, thisrecp, 1, 1);
+ if (!IsEmptyStr(thisdsn)) {
+ strcat(thismsg, "<br /> <i>");
+ stresc(&thismsg[strlen(thismsg)], sizeof thismsg,
+ thisdsn, 1, 1);
+ strcat(thismsg, "</i>");
+ }
+ thismsg_len = strlen(thismsg);
+
+ if ((recipients_len + thismsg_len + 100) < sizeof recipients) {
+ if (!IsEmptyStr(recipients)) {
+ strcpy(&recipients[recipients_len], "<br />");
+ recipients_len += 6;
+ }
+ strcpy(&recipients[recipients_len], thismsg);
+ recipients_len += thismsg_len;