Hello Melissa,

Historians believe that Sunday, July 29, 2001 at 16:11 GMT -0700 was
when, Melissa Reese [MR] typed the following:

MR> certain thing is possible.  Not knowing quite how - or even if - this
MR> can be done, I come here to ask...

You came to the right place.

MR> She receives several messages a day from a company (form letters -
MR> "From:" field is always the same). Within the message body of each
MR> one, there are a few unique fields - two of them being the first name
MR> and address of a different person. Looking *exactly* like this:

MR> Q1: What is your first name?
MR> A1: <Name>

MR> Q3: What is your e-mail address
MR> A3: <Email address>

MR> Is it somehow possible to "capture" the first name and email address
MR> from the body of these "form" messages that arrive (format is exactly
MR> as shown above),

Yes, using regular expressions.

MR> and send out "individualized" auto-response messages

Do you know how to do this part in a filter?  You can specify the
template to use in there.

MR> using the captured first name

 I recommend you make a couple of quick templates.  First, for the
 name, select Options -> QuickTemplates -> New
 Give it an easy name like: "Form-FirstName" (without quotations)

In this template put:
%SETPATTREGEXP="(?is)^A1\:\s*\<?(\S*?)(\s+(\S*?))*?\>?$"%-
%REGEXPMATCH="%TEXT"

MR> in the salutation,

In your the template where you make the salutation, when you want the
name, just insert: %QINCLUDE="Form-FirstName"

MR> and making the
MR> captured email

Put this one in a quick template called "Form-E-mail"
%SETPATTREGEXP=(?is)^A3\:\s*\<?(\S*?)\>?"%-
%REGEXPMATCH="%TEXT"

MR> address the recipient?

In your auto-reply template use:
%TO='%QINCLUDE="Form-E-mail"'

This will *add* the extracted address to the recipient list.

MR> And - for already received and saved messages, can a manual "hotkey"
MR> application of the filter/auto-response, applied to a folder (Inbox),
MR> generate these individual response messages and send them out?

Yup, right-click on the folder and select re-filter.  There is a
Hot-key option in the filters, but I've personally never used it.
Maybe someone else could lead you through the steps.

MR> I've only used the auto-response and Macro/template features in their
MR> most basic form so far, and this feels a bit over my head at the
MR> moment.

This is TB, it can be done.  <g>

MR> Any help would be appreciated.  If you feel your answer(s) may be too
MR> long for the list,

I don't think there is a rule about that.  But, any questions about
regular expressions really should go to the TBTECH list (see message
footer.)  Your post was ok, but I'm walking a thin, fuzzy line.  ;-)

-- 
Thanks for writing,
 Januk Aggarwal

Using The Bat! 1.54 Beta/4 under Windows 98 4.10 Build 2222  A

Is it OK to use the AM radio after noon?

-- 
______________________________________________________
Archives   : <http://tbudl.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
TBTech List: <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>

You are subscribed as : [email protected]


Reply via email to