Patch for Document Send Template

Introduction
Patch for C55 Document Send Template. Document Send template is found to have a bug that was there forever. It makes this useful template very unreliable especially when it comes to sending embedded images. We already reported this bug to Soft Velocity, but until they fix it this patch can be used to significantly improve performance of that template.

Just move mouse over the right image and you will see what this patch does.

C55 ABC Document Send Template potentially is very useful tool for sending emails right
from a Clarion application. However we noticed long time ago that something is horribly wrong with it.
Play with Example provided with C55 for instance.  You can send a bunch of identical emails
with one click of button that is quite impressive. But before implementing it into your program
try to send all those messages to yourself. You will discover that a half of emails are
corrupted and instead of beautiful images have some ugly rectangles like that above.
What happens is Document Send Template eventually starts to inset every now and then
space character in the MIME document in the beginning of new line. This innocent 
character is not supposed to be there at all and it screws up emailing completely.
Below is an example of MIME document generated by C55 Document Send Template.
Lines 4 and 9 (highlighted) have extra space character in the most left position. That's it!
MIME will not see the forth line at all, so this embedded image will be treated as
attachment and recipients of this email will see nothing, but empty rectangle.
------=_NextPart_1
Content-type: image/gif
Content-ID: <1>

 Content-Disposition: inline; filename="1"
Content-Transfer-Encoding: Base64

183GmgAAAAAAALAJsw0sAQAAAAA+UgEACQAAA/sCAAAGABMAAAAAAAUAAAALAgAAAAAFAAAADAKz
DbAJAwAAAB4ABQAAAAkCAAAAAAQAAAACAQIABQAAAAEC/4D/AhAAAAD7Asb/AAAAAAAAvAIBAAAA

 
AAAAAEFyaWFsAAABBAAAAC0BAAAFAAAACQIAAAAABAAAAC4BAAATAAAAMgovAbwDEAAGAPQCLwFr
Bn0BU3R1ZGVudCBTY2hlZHVsZQQAAAAnAf//AwAAAB4ABQAAAAkCAAAAAAQAAAACAQIAEAAAAPsC
It appears to be the only problem this template has. Once you get rid of those
spaces the problem goes away. And that's exactly what our patch does!
Advantages of using template:
  • This patch is reversible so later, when the bug is fixed by Soft Velocity,
    you will be able to painlessly get rid of it
  • With this patch Document Send C55 template works without any glitches
    at all so probably that's the only problem it's got. 
Installation
 
Run the installation wizard. Register new template placed by Wizard
into your Clarion Template directory - mimefix.tpl
Just in case here is instruction how to do that.
Open Clarion 55 (no application must be open). Go to menu item
Setup -> Template Registry ->Register. Select new template
mimefix.tpl and then hit Open button
View animated reminder on how to do that - Registering Template
(built with our JAVA Animated Help Builder).
Running Patch
Document Send Patch is organized as Utility template. So to run it you have to 
open ANY application first (it really doesn't matter which one!).
Go to menu item Application/Template Utility. Find MIMEfix - Vivid Help:: Document
Send Bug Killing Utility and hit Select button. It'll bring template window:
Run utility with OK button. If you want uninstall this patch - select Reverse Patch
radio button first. If you don't remember whether you've already run this utility
you can run it again as many times as you want. This utility changes one file from
C55/Libsrc directory so it's a good idea to backup entire directory before running template.
Download Installation Program (230 kb)

Copyright (C) 2002 Vivid Help Systems Pty Ltd