Been using the sample code from Bob for several years. Testing against a spam filter, the example gives incorrect lengths (78 instead of 76) per line, triggering a spam assassin flag.
Changing the code to step/break at 74 char seems to solve the "problem".
My "guess" is the TCP Print's adding the CR/LF is the issue...
---
Bob's example:
' Assumes the entire file has been read into Attachment$
MimeData$ = MimeEncode$(Attachment$)
FOR Counter& = 1 TO LEN(MimeData$) STEP 76
IF LEN(MimeData$) - Counter& >= 76 THEN
TCP PRINT hTCP, MID$(MimeData$, Counter&, 76)
ELSE
TCP PRINT hTcp, Mid$(MimeData$, Counter&) & "="
END IF
NEXT Counter&
Changing the code to step/break at 74 char seems to solve the "problem".
My "guess" is the TCP Print's adding the CR/LF is the issue...
---
Bob's example:
' Assumes the entire file has been read into Attachment$
MimeData$ = MimeEncode$(Attachment$)
FOR Counter& = 1 TO LEN(MimeData$) STEP 76
IF LEN(MimeData$) - Counter& >= 76 THEN
TCP PRINT hTCP, MID$(MimeData$, Counter&, 76)
ELSE
TCP PRINT hTcp, Mid$(MimeData$, Counter&) & "="
END IF
NEXT Counter&
Comment