Email Data Template |
|
|
|
|
|
EmailData Template for Clarion
5-10... ABC/Legacy. This is a template which gives you full control over email subject, body, and
attachments. It can be used for composing complex emails similar
to Clarion reports. No email settings are required from end-users. The picture on the right gives you some idea of how the template works, but you'd be better off to download our 'Try Before Buy' version of the template. Please do not try to move the cursor over the image! Have a quick look at a few emails. |
|
EmailData Template allows you to populate the Address, Subject, Body, and Attachments | |
of your emails directly from your Clarion fields. Be aware that you should use only plain Clarion | |
syntax. No exclamation marks in front of variables, whatsoever. | |
This makes it a very intuitive and powerful tool when it comes to composing report-like emails. | |
Like our previous EmailReport template this one is designed to work in conjunction with Outlook | |
Express which these days is a part of Windows OS. So every Windows user has it. | |
And what is even more important - the majority of people know how to use it, how to | |
insert a picture, how to add new attachments etc. because they use this program every day | |
and they trust it. So the question is: Why remove it from them? Let your customers use their | |
favourite program for sending Clarion data as well! So all of them can say: "Yes, | |
I did send this booking confirmation, here it is in my Sent Items folder!". | |
Users can still employ any emailing program they like for their everyday emailing, | |
but for sending Clarion reports EmailData template will automatically invoke Outlook Express. | |
And if they prefer to have their sent emails in another email program, they can | |
from time to time import them from Outlook Express. | |
And last, but not least - now you can send any audio files supported by HTML | |
(*.wav, *.mid, *.ram, *.ra, *.aif, *.au) and play them as many times as you wish. | |
Advantages of using the template: | |
|
|
Installation |
|
Run the installation wizard. It will guide you through a few simple steps. That is it. | |
IMPORTANT: If you are using Clarion 5-6, after selecting Clarion5-Clarion6 directory wizard | |
will offer to install it into C:\Clarion5(6)\Clarion8 or C:\C55\Clarion8 directory respectively. | |
So don't forget to get rid of last \Clarion8. But even if you do - no problem. | |
Just uninstall the template and re-run the installation. | |
To start using the template you'll need to manually register it. | |
Here's how: Open Clarion (no application must be open). | |
Go to menu Tools (Setup) -> (Edit) Template Registry -> Register. | |
Select new template emaildata.tpl and then hit Open button | |
You can find it in Clarion7(8,9,10...)\accessory\template\win | |
for Clarion >= 7 and in Clarion*\Template - for all others. | |
View our animated reminder on how to do this - Registering Template | |
(built with our JAVA Animated Help Builder). | |
|
|
Using the EmailData template is intuitive and self-explanatory. | |
First of all you need to install the global EmailData extension template into your | |
application Global area (no matter DLL it is or EXE). | |
You have the option to define one email background colour here for all procedures. | |
Later you can override it for any button you like (see picture below). | |
These are all settings you have to define in local extension. | |
Pay special attention to EmailTo. You can either hardcode them or build | |
as a combination of your fields. Just follow the simple specification below and | |
standard Clarion syntax. For your convenience we've put the Example textbox | |
(not used by template) with a few standard Email address prototypes. So you can copy | |
and paste any of the examples and just replace our field names with yours. | |
It goes without saying that CC and BCC prompts follow the same rule as | |
does EmailTo. | |
Both EmailTo and Subject fields should be valid Clarion strings. Use lookup | |
buttons to find and append any field from your Application as you would for formulae. | |
TIP: If you fetch fields don't forget to hit the Tab key to accept the whole string before | |
clicking the OK button or Clarion can lose the latest appended material :-( | |
For attachments you can use variables, hard-coded strings or build them like we did | |
on the second Tab. Building the message body is even easier - just compose each line of | |
the body line by line following standard Clarion string syntax (see the picture | |
and our 2 example application (ABC/Legacy) for further reference). | |
We have installed this example into your Clarion*\Examples\eData directory | |
Or Clarion7(8,9,10...)\Lessons\eData in Clarion 7-10.... | |
So for various settings you can investigate the source. | |
You needn't be concerned with the 2 new features - image embedding and network | |
friendliness. They work automatically. When embedding images the template | |
follows a simple logic - if you put a local image into the email HTML it means | |
you want it to be embedded. Indeed, it will not be available for viewing | |
by email recipients anyway and they'll see just empty rectangles instead. | |
This is the last thing you want to happen to your customers! | |
Email SV Report PDF Extension | |
This is a new extension specially designed to dramatically simplify | |
exploiting the new C6 feature - Output report into PDF. | |
To enable emailing of PDFs, you have to first insert global EmailData | |
extension in the Global area and then insert another global extension - | |
Email SV Report PDF Global. | |
You will see the new Tab General in all application reports. The template generates a | |
global variable (GLED:Mode) associated with the only prompt on this Tab. | |
It is the main switch to enable/disable PDF emailing. | |
You can use either numbers or pre-defined equates. We've put them on the last tab | |
so you can copy and paste them into your code from there: | |
|
|
It works in very much the same way as Clarion Global request. So if you say: | |
GLED:Mode = GLEQ:Email; YourReport() !report will be emailed; | |
GLED:Mode = 0; YourReport() !report will be emailed. | |
If you want to disable emailing, you need to prime this variable to 1: | |
GLED:Mode = GLEQ:Print; YourReport() or GLED:Mode = 1; YourReport() - | |
report will be printed (emailing is disabled). | |
All other Tabs are absolutely the same as in button and embed templates. | |
So use them the same way. | |
You can find an example in this directory: Clarion*\Examples\eData\c6 | |
All other email prompts are absolutely the same as when you use the | |
template to compose ordinary emails. | |
As to Report to PDF Clarion template itself, there is only one restriction. | |
You can use EmailData in conjunction with Output Name Type Variable or | |
Fixed, but not Runtime. | |
You can have a quick look at email generated by this extension. | |
Email wPDFControl PDF Extension | |
This is another extension specially designed to allow you to email reports in PDF | |
created with wPDFControl PDF by KlariSoft (not included!). | |
To enable this feature you have to first insert the global EmailData extension | |
in the Global area and then insert procedure extension - | |
Email wPDFControl PDF by KlariSoft in all reports to be emailed. | |
You will see the new Tab General. The template generates a global variable | |
(GLED:Mode) associated with the only prompt on this Tab. | |
It is the main switch to enable/disable PDF emailing. | |
You can use either numbers or pre-defined equates. We've put them on the last tab | |
so you can copy and paste them into your code from there: | |
|
|
It works in very much the same way as Clarion Global request. So if you say: | |
GLED:Mode = GLEQ:Email; YourReport() !report will be emailed; | |
GLED:Mode = 0; YourReport() !report will be emailed. | |
If you want to disable emailing, you need to prime this variable to 1: | |
GLED:Mode = GLEQ:Print; YourReport() or GLED:Mode = 1; YourReport() - | |
report will be printed (emailing is disabled). | |
All other Tabs are absolutely the same as in button and embed templates. | |
So use them the same way. | |
You can find an example in this directory: Clarion*\Examples\eData\wPDFControl | |
On details of wPDFControl usage please visit KlariSoft site: www.klarisoft.com | |
or just download free fully functional demo of wPDFControl. | |
Move cursor on top of a Tab to open! | |
Advanced usage | |
Although the word "advanced" sounds slightly scary, the only thing you have to know to be | |
on top of "advanced" design is how to build a Clarion queue. | |
Both attachments and email body lines are stored in 2 global queues (GL:AttachmentQue | |
and GL:BodyQue correspondingly). So for all emails you just use the template settings | |
which will populate the queues for you. But if you don't want to bother, you | |
can simply directly populate those queues from the only embed point we created for you - | |
EmailData After filling queues - which you can find among the button embeds. Just | |
remember, that each queue node represents one line in the body of a message. | |
You can use HTML tags as well. (Tag usually starts with something | |
like <font> and ends with </font>. It can be <img> and </img> etc.) | |
If you like doing things in hard way you can consult HTML | |
and MIME documentation. For everyone else, here is a simple tip: | |
Use your Outlook Express for visual design. Just create a new | |
message with it, insert images, text with any font you like etc. and then | |
Save it As a EML file. Done! Now you can open this file with any text editor | |
(say Notepad) and copy and paste HTML tags one by one. Just remember | |
that each tag should occupy one line in the body queue. | |
This restriction comes from the way we've built the message body, not from HTML syntax. | |
To make life easier we've put a new-line tag after each line of HTML | |
So if you try to split a tag on more than one line - this tag will get broken | |
by the new-line tag inserted by template. | |
For your convenience we've provided a few of the most common tags. You can copy | |
and paste them directly into your template settings. (Do not forget change our | |
image/text with yours :-) | |
And the last thing to bear in mind: If you want to show web images, remember | |
they should be published somewhere on the Net and referenced from there. | |
You can even use your web space which everybody has from their internet-provider. | |
Usually something horrible like http://fastnet.com.au/~alexanderg. Not to worry - | |
nobody will see that web address anyway! We put all possible scenarios into the | |
example shipped with the template (Clarion5, C55 or Clarion6)\Examples\eData), so you | |
can borrow code from there. Just have a look, it's not rocket science! | |
Users Tips (you are welcome to send your tips to this area!) | |
1. Latest WinXP issue. If you see email preview without Send button | |
it means you should apply MS patch for OE. The simplest way to | |
do it is to use Adobe version of it: adobeforums.com. To avoid | |
registration you can log in as guest. | |
Alternatively you can download original MS patch here: microsoft.com | |
but it is much harder to use it. | |
2. WinXP issue II - No Send Button on new email. You are welcome to download | |
a program of ours (Clarion 6 code is included) to reset respective registry setting. | |
Copyright © 2025 Vivid Help Systems Pty Ltd |