Pages: 1
RSS
notify how many messages sent
 
hi,

i'm a first time user of this cool email program. i just want to know if it is possible to create an autoreply template that notifies the sender the number of his sent emails? if it is, how will i do it?

thanks in advance to anyone who can help me... :)  
 
Yes, you can do this.
However in order to make this work, you'll have to maintain a database that contains for each of your contacts the number of messages they sent you.

The easiest way to keep track of the number of messages would be to create for each contact a text file with the number of messages as contents.
Let's place this database in the directory
C:\MsgCnt
In this directory you need to place a file count.txt with as sole contents the number 1 (no line feed, no trailing spaces, just the character)

Now we need to take care of the creation of records for your contacts and updating their records on receipt of a new message, as you want to this this automaticaly, we do this with a batch file we make TB create and execute through a filter.

Create a filter
Set the appropriate conditions (I don't suppose you want to send your boss messages like: 'Hey bozo, Stop bugging me, you sent me 100 messages')
Add three actions:
1) An export action
2) An execute external command action
3) An Auto reply action.

1) The export action
Set the action to export to text
Export to file: C:\MsgCnt\Update.bat
Export to plain text
Overwrite the existing file
And set the template to this:

============================================
@echo off
:start
if exist %OFromAddr goto update

:initiate
copy C:\MsgCnt\Count.txt C:\MsgCnt\%OFromAddr
goto end

:update
echo %Calc('%Put("C:\MsgCnt\%OFromAddr") + 1') > C:\MsgCnt\%OFromAddr
goto end

:end
============================================


don't include the === lines in the template.



2) The Run external program action
Command line:
C:\MsgCnt\Update.bat


3) The autoreply action.
Create a reply template.
Insert %Put("C:\MsgCnt\%OFromAddr") at the place where you'd like to have the number of messages.

It is important that you set the actions in this filter in the sequence I set,otherwise it won't work properly.

Notes:
WARNING I didn't test it
For more info about batch files, google for "batch files" and "dos"

__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.
Pages: 1