Roelof:

Thank you. Your input was VERY helpful. I will experiment
with it and try it out. Thanks again for the very detailed reply.

Kind Regards,

Carlton




----- Original Message -----
From: "Roelof Otten" <[EMAIL PROTECTED]>
To: "C.R." <[EMAIL PROTECTED]>
Sent: Thursday, May 09, 2002 9:56 AM
Subject: Re: Converting incoming html email to Plain Text or omitting it
altogether


> Hello Carlton,
>
> On Thu, 9 May 2002 05:37:23 -0700GMT (9-5-02, 14:37 +0200GMT, where I
> live), you wrote:
>
> CR> incoming email before I receive it. The problem is that I'm
> CR> receiving emails with a *.wav attachment that I want to forward to
> CR> others, but the Bat is also sending a second attachment, which is
> CR> the message's html, and it contains info
>
> You cannot separate the html-attachment and the wav-attachment when
> you're forwarding. (That would've been best.)
> However you can separate the attachments when you're saving them to
> file, because then they're separate files.
>
> Therefore, the first thing is to save them to disk (save attachment to
disk, can
> be done in a filter), see my filter wav1 at the bottom of my message.
>
> OK, so now you've got a wav that needs to be sent. You can send files
> with TB by attaching them to a message. However you need the name of
> the file to do this. So we'll create a batchfile that finds the name
> of the saved wav-file and creates a message from the commandline and
> attaches your wav. We can run a external program (including
> batchfiles) from a filter. See my filter wav2.
>
> I'll go bit further into the needs of the batch-file first. Here's my
> example, it's an adapted version of the batch-file that I use to
> distribute pictures.
>
> --begin autowav.bat-----------------------------
> g:
> cd\autofoto
> for %%f in (*.wav) do
c:\progra~1\thebat~1\thebat.exe/maila=g:\autofoto\%%f;t=g:\autofoto\sillytex
t.txt;s="Voicemail for Carlton in file %%f"
> del *.wav
> --end of autowav.bat----------------------------
>
> Notes
> The batchfile is called autowav.bat, so that's the name the filter has
> to call.
> The directory I was using was g:\autofoto, that's the reason for the
> first two commands.
> The second command is a for-loop that runs TB with the mentioned
> parameters for every *.wav in the directory
> I create a new message with thebat.exe/mail
>     to attach a file that's followed by a=filepath\filename
>          the filepath is the directory you've saved your .wav
>          the filename is inserted by the %%f parameter (that's dos)
>     the textbody is taken from the file indicated with t=path\file
>     I've inserted the wav-name in the subject, that's the reason for
s=path\name
>     I haven't done any addressing yet, but I'll do that in
>     sillytext.txt, because that's a place where I can use all TB's
>     macros, and I suppose the recipient is always the same person/group
> The last command is del *.wav, that's to delete all wav-files from
> your directory so you won't send them twice. I don't know how often
> you receive these messages or specifically how many at the same time,
> but if you're receiving them more than one at a time the batch-file
> needs some tweaking.
>
> The messagebody/template:
> ---begin of sillytext.txt--------------------------------------
> %from="Voicemail service <[EMAIL PROTECTED]>"%-
> %to="[EMAIL PROTECTED]"%-
> Hello,
>
> Here's another silly voicemail message.
>
> The Bat!, Carlton's voicemail servant
> ---end of sillytext.txt-----------------------------------------
>
> Notes
> I need a from-address, that's the reason for %from
> I need a to-address, that's the reason for %to
> The %- are included to prevent the occurring of empty lines.
> The rest is just a silly text. ;-)
>
> Now you've succeeded into separating the .wav from the rest of the
> message, to attach it to a new message. Now it has to be sent, because
> it's still residing in your outbox.
> It depends on your needs of course, because when you're doing combined
> collect/deliveries and you're collecting every five minutes, it's not
> really necessary to send it right away.
> Anyhow I want to send now.
> First I thought to achieve this by adding the command:
> c:\progra~1\thebat~1\thebat.exe/send*
> Because that's what I'm doing when distributing my photos. But because
> the batchfile is run from the sorting office and that's being run from
> the connection centre that doesn't work. (TB thinks don't bother me,
> I'm sending already.)
> So I created another filter that's being triggered by the same
> condition as the first two. (See wav3) It's creating a short message
> and it has as option 'Send generated messages: Immediately' (No, this
> option won't work for the second filter.)
>
> General notes on the filters.
> Because the same message has to trigger three filters, the first to
> filters must have checked at options: 'Continue processing with other
> filters.'
>
> Now the 'pasted' filters:
>
> BeginFilter
> Name: wav1
> Active: 1
> Source: \\roelof\Inbox
> Target: \\roelof\Inbox
> CopyFolder: \\\\none
> MainSet: 20wav-test
> Actions: faoContinueProcessing,faExtractFiles
> AddGroups:
> DelGroups:
> ForwardTemplate:
> ConfirmTemplate:
> ReplyTemplate:
> FwdAddr:
> RedirectAddr:
> NewAddr:
> NewTemplate:
> ExtCmd:
> ExtFile:
> ExtractDir: G:\autofoto
> ColourGroup: <default>
> AddAddrItems: afiFrom,
> DelAddrItems: afiFrom,
> HotKey: 0
> IsOfColour: <default>
> SizeBigger: 0
> SizeSmaller: 0
> AgeOlder: 0
> AgeNewer: 0
> InAddrPos: 0
> OutAddrPos: 0
> InAddrGroups:
> NoAddrGroups:
> KillFile:
> KillMethod: 0
> SaveTemplate:
> SndFile:
> SysSound: 0
> SoundTime: 0:00-0:00
> AllowTime: 0:00-0:00
> EndFilter
>
> BeginFilter
> Name: wav2
> Active: 1
> Source: \\roelof\Inbox
> Target: \\roelof\Inbox
> CopyFolder: \\\\none
> MainSet: 20wav-test
> Actions: faExternal,faoContinueProcessing
> AddGroups:
> DelGroups:
> ForwardTemplate:
> ConfirmTemplate:
> ReplyTemplate:
> FwdAddr:
> RedirectAddr:
> NewAddr:
> NewTemplate:
> ExtCmd: G:\autofoto\autowav.bat
> ExtFile:
> ExtractDir:
> ColourGroup: <default>
> AddAddrItems: afiFrom,
> DelAddrItems: afiFrom,
> HotKey: 0
> IsOfColour: <default>
> SizeBigger: 0
> SizeSmaller: 0
> AgeOlder: 0
> AgeNewer: 0
> InAddrPos: 0
> OutAddrPos: 0
> InAddrGroups:
> NoAddrGroups:
> KillFile:
> KillMethod: 0
> SaveTemplate:
> SndFile:
> SysSound: 0
> SoundTime: 0:00-0:00
> AllowTime: 0:00-0:00
> EndFilter
>
> BeginFilter
> Name: wav3
> Active: 1
> Source: \\roelof\Inbox
> Target: \\roelof\Inbox
> CopyFolder: \\\\none
> MainSet: 20wav-test
> Actions: faNewMsg,faoSendNow
> AddGroups:
> DelGroups:
> ForwardTemplate:
> ConfirmTemplate:
> ReplyTemplate:
> FwdAddr:
> RedirectAddr:
> NewAddr: [EMAIL PROTECTED]
> NewTemplate: Hey\20Boss,\0D\0A\0D\0AYou\27ve\20got\20voicemail.\0D\0A
> ExtCmd:
> ExtFile:
> ExtractDir:
> ColourGroup: <default>
> AddAddrItems: afiFrom,
> DelAddrItems: afiFrom,
> HotKey: 0
> IsOfColour: <default>
> SizeBigger: 0
> SizeSmaller: 0
> AgeOlder: 0
> AgeNewer: 0
> InAddrPos: 0
> OutAddrPos: 0
> InAddrGroups:
> NoAddrGroups:
> KillFile:
> KillMethod: 0
> SaveTemplate:
> SndFile:
> SysSound: 0
> SoundTime: 0:00-0:00
> AllowTime: 0:00-0:00
> EndFilter
>
>
> Good hunting.
>
> BTW I checked the whole setup, it works here.
>
> BTW2 My trigger for the filters was wav-test in the subject.
>
> BTW3 If you think it's sufficient to send the .wav's once or twice a
>      day, you can skip filter two and three and start the batch-file
>      from a schedule in Windows taskmanager. In that case you can use
>      the 'c:\progra~1\thebat~1\thebat.exe/send*' command as end of
>      your batch-file.
>
> --
> Groetjes, Roelof
>
>
> ________________________________________________________
> Current Ver: 1.60i
> FAQ        : http://faq.thebat.dutaint.com
> Unsubscribe: mailto:[EMAIL PROTECTED]
> Archives   : http://tbudl.thebat.dutaint.com
> Moderators : mailto:[EMAIL PROTECTED]
> TBTech List: mailto:[EMAIL PROTECTED]
> Bug Reports: https://bt.ritlabs.com
>


________________________________________________________
Current Ver: 1.60i
FAQ        : http://faq.thebat.dutaint.com 
Unsubscribe: mailto:[EMAIL PROTECTED]
Archives   : http://tbudl.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
TBTech List: mailto:[EMAIL PROTECTED]
Bug Reports: https://bt.ritlabs.com

Reply via email to