Hello Marten, > Anyone know if there's a way of extracting an email address from the > body of an email and using that as the 'from' address to allow me to > send the message to a 'subscribe' to an email newsletter that they > want to be subscribed to.
I manage several mailing lists and newsletters and I have different set-ups to achieve what you want depending on where the subscription request comes from and if the request is a form filled in on a website or just "any" message. For the more general case, where the e-mail address is somewhere in the body and not following a known patter like E-mail: [EMAIL PROTECTED] where Regex could be used to automatically find the address, I do the following: - Either with Incoming or Read filters, or even moving them manually, the messages and up in a folders I call Subs. - In Subs, I have a folder template for new messages as follows: ,----- [ New template in Subs ] | %From=""%From="[EMAIL PROTECTED]"%- | %QINCLUDE="ADNL" `----- ADNL is a QT as follows: ,----- [ ADNL, subscribe to Newsletter ] | %Clear%- | %FROM=""%FROM="%TOADDR"%- | %TO=""%TO="[EMAIL PROTECTED]"%- | %SUBJECT="News"%- | %Cursor `----- So, what I do while viewing a message in Subs folder is to double click on the e-mail address [EMAIL PROTECTED] that I want to subscribe. This opens the editor with my address in From and [EMAIL PROTECTED] in To, and when ADNL is executed voila! [EMAIL PROTECTED] is moved to From: and To: is filled in with [EMAIL PROTECTED] and only thing I have to do is hit Send. Now, I have another approach to process information requests that come from a form in my website. Because the way the form is set up, the From address is that of the person who filled in the form. My approach is a bit different for these messages. First because I can use the From: and second because I make a distinction based on the country the person is writing from. The form includes Country: field all by itself in a line, like: Country: Spain And what I want to do is to subscribe those from Spain to a newsletter in Spanish and otherwise the the English version. What I do here is use a Read filter that, aside of moving the message to a Processed folder, includes an action (selected on the Actions tab) to generate an auto-reply using a template. This is the template: ,----- [ Auto-reply template ] | %FROM=""%FROM="%OFROMNAME <%OFROMADDR>"%- | %SUBJECT="Add lead"%- | %REPLYTO=""%REPLYTO="%OFROMNAME <%OFROMADDR>"%- | %IF:"%REGEXPTEXT=""Spain"="Spain":"%QINCLUDE=""ADNT":"%QINCLUDE=""ADNL" `----- ADNL is shown above and ADNT is the same except that the To: will be [EMAIL PROTECTED] Hope it helps. -- Best regards, Miguel A. Urech (El Escorial - Spain) Using The Bat! v2.01.3 Winamp OFF: ________________________________________________ Current version is 2.02.3 CE | "Using TBUDL" information: http://www.silverstones.com/thebat/TBUDLInfo.html