on 12/7/04 4:09 AM, Barry Wainwright at [EMAIL PROTECTED] wrote:
> On 7/12/04 8:17 am, "Scott Haneda" <[EMAIL PROTECTED]> wrote:
>
>> on 12/7/04 12:02 AM, Scott Haneda at [EMAIL PROTECTED] wrote:
>>
>>> I have a web form that will be sending me emails that contain a single email
>>> address in the body, I want to somehow automate the process of getting that
>>> email address into a group, how can I do this?
>>
>> I should mention, the subject has a passcode in it, that is how the script
>> can identify these emails from others.
>
> OK, identifying the mail is easy - do that with a rule.
>
> Then, where in the body does the email address appear? You could parse the
> whole mail looking for it, but that is less certain than extracting it from
> a known location.
The body of the email only contains one single email adress, your code below
will work on that, but I suspect it is overkill since I just need the entire
string.
> This will extract the address, but I don't guarantee it's accuracy on all
> addresses, especially if they contain non-ascii charcacters:
>
>
> set thebody to "blah blah blah blah blah blah
> blah blah blah blah blah. blah blah blah <[EMAIL PROTECTED]>
> blah blah blah blah blah "
> set AppleScript's text item delimiters to {"@"}
> set theBits to text items of thebody
> set theAddress to {get last word of item 1 of theBits, get first word of
> item 2 of theBits} as string
How do I set the body of the email to a variable?
> Now, you need to add that address to a group.
>
> Assuming the group already exists, you can access it by calling for:
> group "group_name"
>
Can I get a little snipped of how that syntax would work out to add the body
as an address?
> Will do what you want. It would be worth putting in a check to see if
> 'theaddress' already exists within the group before adding it again, or you
> could end up with several duplicates if people submit the form more than
> once (as they are wont to do!).
>
> I hope this helps you on your way. Sing out for more assistance if needed.
The dupe check is a good idea, if you could step me through it, I sure would
appreciate it.
Thanks again.
--
-------------------------------------------------------------
Scott Haneda Tel: 415.898.2602
<http://www.newgeo.com> Fax: 313.557.5052
<[EMAIL PROTECTED]> Novato, CA U.S.A.
--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>