Problem with using SMTP Socket

Really I am aiming this question to Shaun at Cisco Software Limited.

Like yourselves, we successfully used a version of winbmail to send binary attachments, mainly PDF files as emails linking to customers email servers using SMTP, and C$SOCKET. However, now we have a problem that receiving such emails into some email systems, e.g. GMail, the PDF files are supposedly corrupt. We as a company use GMail, but relay the files into Outlook. Within Outlook the files are fine.

I have been looking at the code of program "csndml" and have noticed that some of the details passed are different to ours as follows:

We send HELO, whereas your program sends EHLO. Could this be the reason why we are having issues?

We do not send the following at all:

INITIALIZE WRK-DATA-RECORD
MOVE 1 TO BYTES-TO-SEND.
STRING "X-Mailer: csndml - Sysco Software 01/08/2007"
CRLF
"Mime-Version: 1.0"
CRLF DELIMITED BY SIZE
INTO WRK-DATA-RECORD
WITH POINTER BYTES-TO-SEND
END-STRING
PERFORM SEND-DATA-MAIL

I was thinking maybe new emailing systems require this? However, we do send:

STRING "--boundarystring"
CRLF
'Content-Type: application/octet-stream; name="'
DELIMITED BY SIZE
WS-PRINT-FILENAME
DELIMITED BY " "
'"'
CRLF
"Content-Transfer-Encoding: base64"
CRLF
'Content-Disposition: attachment; filename="'
DELIMITED BY SIZE
WS-PRINT-FILENAME
DELIMITED BY " "
'"'
CRLF DELIMITED BY SIZE
INTO DATA-RECORD
WITH POINTER NUM-TO-SEND
PERFORM SEND-DATA.

Obviously we can try adding the above equivalent to see what happens, but if you know for certain we need this, then please let me know.

Any assistance will be most appreciated. Thanks.