Announcement

Collapse
No announcement yet.

Base 64 encoding comment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Base 64 encoding comment

    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&

  • #2
    Originally posted by Dennis Pearson View Post
    My "guess" is the TCP Print's adding the CR/LF is the issue...
    Append a semicolon at the end of the TCP PRINT statement to prevent it appending $CRLF, or use TCP SEND
    -

    Comment


    • #3
      The purpose of the message was simply to point out the sample is not "quite" as accurate as it was likely intended... Personally I took the change length solution as it seemed to offer less chance of breakage as it is not likely to cause problems if there is a mail reader expecting CR/LF.

      Comment


      • #4
        The purpose of the message was simply to point out the sample is not "quite" as accurate as it was likely intended
        I trust you sent this in to the PB support dept. They can correct it for the next release of samples.

        Think about it... if you found a problem with the sample, ya think maybe PB Support might be getting other calls about it? And as much as they may enjoy the intercourse inherent in support work they might get by with a tad less?
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Point taken - and I have done so as well as added a suggestion the SMTP sample be updated so newbies with port blocking ISP's get a working sample.

          A good reason to post here is the Bob sample is not "broken", nor is it likely to cause many encoding specific support issues as the line length is not a message breaker. In my case, it simply tripped a spam flag increasing the chance that my message is blocked.

          Maybe someone else is having support issues with mail containing mime encoding "not getting through" for some reason and will find this post helpful.

          Comment

          Working...
          X