Re: Extract email(s) from non-delivered message

2006-04-19 Thread Thomas Chiverton
On Wednesday 19 April 2006 04:31, Rey Bango wrote:
 something, I'd like to see if there's something already built to handle
 this:
  [EMAIL PROTECTED]:
  This user doesn't have a yahoo.com account ([EMAIL PROTECTED]) [0]

You mean like a regular expression, wrapped in a simple loop over each line ?

-- 

Tom Chiverton 
Advanced ColdFusion Programmer

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238066
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Rey Bango
Sure. Got something like that? ;)

Rey...

Thomas Chiverton wrote:
 On Wednesday 19 April 2006 04:31, Rey Bango wrote:
 
something, I'd like to see if there's something already built to handle
this:
 [EMAIL PROTECTED]:
 This user doesn't have a yahoo.com account ([EMAIL PROTECTED]) [0]
 
 
 You mean like a regular expression, wrapped in a simple loop over each line ?
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238085
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Thomas Chiverton
On Wednesday 19 April 2006 15:20, Rey Bango wrote:
 Sure. Got something like that? ;)

Ben Nadel suggest a reg. ex. yesterday.

-- 

Tom Chiverton 
Advanced ColdFusion Programmer

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238089
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Extract email(s) from non-delivered message

2006-04-19 Thread Ben Nadel
I had some time to nail something down Try this:


cfsavecontent variable=Test
 On Wednesday 19 April 2006 04:31, Rey Bango wrote:
 
something, I'd like to see if there's something already built to 
handle
this:
 [EMAIL PROTECTED]:
 This user doesn't have a yahoo.com account
([EMAIL PROTECTED]) 
 [0]
 
 
 You mean like a regular expression, wrapped in a simple loop over
each line ?
 
/cfsavecontent

!--- Create a patter. ---
cfset jobjPattern = CreateObject(java,
java.util.regex.Pattern).Compile( (?=\()([EMAIL PROTECTED])(?=\)) ) /

!--- Get the matcher for the patter. ---
cfset jobjMatcher = jobjPattern.Matcher( Test ) /

!--- Create an array to store emails. ---
cfset arrEmails = ArrayNew(1) /

!--- Loop while we have matches. ---
cfloop condition=#jobjMatcher.Find()#

!--- Get the email. ---
cfset ArrayAppend( arrEmails, jobjMatcher.Group() ) /

/cfloop

cfdump var=#arrEmails# / 


...
Ben Nadel 
Web Developer
Nylon Technology
350 7th Ave.
Suite 1005
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com

Sanders: Lightspeed too slow?
Helmet: Yes we'll have to go right to ludacris speed.
-Original Message-
From: Thomas Chiverton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 19, 2006 10:32 AM
To: CF-Talk
Subject: Re: Extract email(s) from non-delivered message

On Wednesday 19 April 2006 15:20, Rey Bango wrote:
 Sure. Got something like that? ;)

Ben Nadel suggest a reg. ex. yesterday.

-- 

Tom Chiverton
Advanced ColdFusion Programmer



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238096
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Thomas Chiverton
On Wednesday 19 April 2006 15:46, Ben Nadel wrote:
 cfset jobjPattern = CreateObject(java,
 java.util.regex.Pattern).Compile( (?=\()([EMAIL PROTECTED])(?=\)) ) /

What's up with refindall() ?

-- 

Tom Chiverton 
Advanced ColdFusion Programmer

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238103
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Rey Bango
Awesome Ben! I'll try that out. :)

Rey...

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238104
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Extract email(s) from non-delivered message

2006-04-19 Thread Ben Nadel
You can't use REFindAll because the RegExp uses a look behind, which is not
supported in CF directly. That's why you have to create a java pattern
matcher... If you wanted to uses REFindAll... You could do something like:

\([EMAIL PROTECTED])

And then when you get the matches you could take the Mid to remove the ( ):

strEmail = Mid( strText, objMatches.Pos[0] + 1, objMatches.Len[0] - 1 );


Something like that... 
...
Ben Nadel 
www.bennadel.com


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238108
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Claude Schneegans
 I need to extract emails from non-delivered messages.

The problem is that there are not two servers that will return messages 
with the same syntax.
If you only send messages to Yahoo, fine, but what if you send messages 
to other types of servers?

Anyway, if you need to parse something, your best solution will be 
CF_REExtract.
See : 
http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238109
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Rey Bango
Damn Ben, I could just hug ya man! Worked like a charm. Would you mind 
breaking the regex down for me so I can tweak it if necessary to 
accomodate other messages?

I'm keeping your email on file. Email me your rates. I might need more 
help in the future.

Rey...

Ben Nadel wrote:
   !--- Create a patter. ---
 cfset jobjPattern = CreateObject(java,
 java.util.regex.Pattern).Compile( (?=\()([EMAIL PROTECTED])(?=\)) ) /
 
 !--- Get the matcher for the patter. ---
 cfset jobjMatcher = jobjPattern.Matcher( Test ) /
 
 !--- Create an array to store emails. ---
 cfset arrEmails = ArrayNew(1) /
 
 !--- Loop while we have matches. ---
 cfloop condition=#jobjMatcher.Find()#
   
   !--- Get the email. ---
   cfset ArrayAppend( arrEmails, jobjMatcher.Group() ) /
 
 /cfloop
 
 cfdump var=#arrEmails# / 
 
 
 ...
 Ben Nadel 
 Web Developer
 Nylon Technology
 350 7th Ave.
 Suite 1005
 New York, NY 10001
 212.691.1134 x 14
 212.691.3477 fax
 www.nylontechnology.com
 
 Sanders: Lightspeed too slow?
 Helmet: Yes we'll have to go right to ludacris speed.
 -Original Message-
 From: Thomas Chiverton [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 19, 2006 10:32 AM
 To: CF-Talk
 Subject: Re: Extract email(s) from non-delivered message
 
 On Wednesday 19 April 2006 15:20, Rey Bango wrote:
 
Sure. Got something like that? ;)
 
 
 Ben Nadel suggest a reg. ex. yesterday.
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238110
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Rey Bango
You're absolutely right Claude. What I was planning on doing is tweaking 
the script as I found emails formatted differently and eventually have a 
nice library of formats setup.

I'll look at CF_REExtract to see if it can help as well.

Thanks,

Rey./..

Claude Schneegans wrote:
  I need to extract emails from non-delivered messages.
 
 The problem is that there are not two servers that will return messages 
 with the same syntax.
 If you only send messages to Yahoo, fine, but what if you send messages 
 to other types of servers?
 
 Anyway, if you need to parse something, your best solution will be 
 CF_REExtract.
 See : 
 http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238111
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Extract email(s) from non-delivered message

2006-04-19 Thread Ben Nadel
 Rey,

Glad I could help... Reg ex is as follows:

(?=\()([EMAIL PROTECTED])(?=\))

(?=\()
This is a zero length match possitive look behing for the string (...
Meaning, at this point in the regexp, the previous character must be a (.
This ( is not part of the matchint string though.

([EMAIL PROTECTED])
This matches any non-line-break containin string that has a @ in it. To be
more appropriate, the .+ might need to be replaced with [^\)]+ which would
match any character that is not )

(?=\))
This is a zero length match possitive look ahead for the string )...
Meaning, at this point in the reg exp, the next character must be a ).
This ) is not part of the matchint string though.

Let me know if you need any more explaination.


This might be more accurate:

(?=\()([EMAIL PROTECTED]@[^\)]+)(?=\))

...
Ben Nadel 
Web Developer
Nylon Technology
350 7th Ave.
Suite 1005
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com

Sanders: Lightspeed too slow?
Helmet: Yes we'll have to go right to ludacris speed.
-Original Message-
From: Rey Bango [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 19, 2006 11:29 AM
To: CF-Talk
Subject: Re: Extract email(s) from non-delivered message

Damn Ben, I could just hug ya man! Worked like a charm. Would you mind
breaking the regex down for me so I can tweak it if necessary to accomodate
other messages?

I'm keeping your email on file. Email me your rates. I might need more help
in the future.

Rey...


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238112
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Extract email(s) from non-delivered message

2006-04-19 Thread Ben Nadel
Rey,

If you are unsure of the email type... You might want to try the reg exp:

If you want to be variable for type, you can try this:

[EMAIL PROTECTED]  for the RegExp.

Matches any string containg the following characters a-z A-Z 0-9 - . _  AND
has at least one @

Might match some crazy strings through like [EMAIL PROTECTED]@ben

But assuming its valid email source... Should be good.

...
Ben Nadel 
www.bennadel.com

-Original Message-
From: Rey Bango [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 19, 2006 11:39 AM
To: CF-Talk
Subject: Re: Extract email(s) from non-delivered message

You're absolutely right Claude. What I was planning on doing is tweaking the
script as I found emails formatted differently and eventually have a nice
library of formats setup.

I'll look at CF_REExtract to see if it can help as well.

Thanks,

Rey./..

Claude Schneegans wrote:
  I need to extract emails from non-delivered messages.
 
 The problem is that there are not two servers that will return 
 messages with the same syntax.
 If you only send messages to Yahoo, fine, but what if you send 
 messages to other types of servers?
 
 Anyway, if you need to parse something, your best solution will be 
 CF_REExtract.
 See : 
 http://www.contentbox.com/claude/customtags/REextract/testREextract.cf
 m
 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238113
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Rey Bango
That did the trick!! Awesome man!

Rey...

Ben Nadel wrote:
 Rey,
 
 If you are unsure of the email type... You might want to try the reg exp:
 
 If you want to be variable for type, you can try this:
 
 [EMAIL PROTECTED]  for the RegExp.
 
 Matches any string containg the following characters a-z A-Z 0-9 - . _  AND
 has at least one @
 
 Might match some crazy strings through like [EMAIL PROTECTED]@ben
 
 But assuming its valid email source... Should be good.
 
 ...
 Ben Nadel 
 www.bennadel.com
 
 -Original Message-
 From: Rey Bango [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 19, 2006 11:39 AM
 To: CF-Talk
 Subject: Re: Extract email(s) from non-delivered message
 
 You're absolutely right Claude. What I was planning on doing is tweaking the
 script as I found emails formatted differently and eventually have a nice
 library of formats setup.
 
 I'll look at CF_REExtract to see if it can help as well.
 
 Thanks,
 
 Rey./..
 
 Claude Schneegans wrote:
 
 I need to extract emails from non-delivered messages.

The problem is that there are not two servers that will return 
messages with the same syntax.
If you only send messages to Yahoo, fine, but what if you send 
messages to other types of servers?

Anyway, if you need to parse something, your best solution will be 
CF_REExtract.
See : 
http://www.contentbox.com/claude/customtags/REextract/testREextract.cf
m

 
 
 
 
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238117
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Extract email(s) from non-delivered message

2006-04-19 Thread Ben Nadel
Rey,

Glad I could help... I am sure there is a better way to make the RegExp,
using the shorthand notation, but I am not an expert on those:

[EMAIL PROTECTED] 

Samd as...

[EMAIL PROTECTED]

Where \w is word characters and \d is digit characters... But can never
remember what exactly whey stand for.

-ben
...
Ben Nadel 
www.bennadel.com

-Original Message-
From: Rey Bango [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 19, 2006 12:00 PM
To: CF-Talk
Subject: Re: Extract email(s) from non-delivered message

That did the trick!! Awesome man!

Rey...

Ben Nadel wrote:
 Rey,
 
 If you are unsure of the email type... You might want to try the reg exp:
 
 If you want to be variable for type, you can try this:
 
 [EMAIL PROTECTED]  for the RegExp.
 
 Matches any string containg the following characters a-z A-Z 0-9 - . _  
 AND has at least one @
 
 Might match some crazy strings through like [EMAIL PROTECTED]@ben
 
 But assuming its valid email source... Should be good.
 
 ...
 Ben Nadel
 www.bennadel.com
 
 -Original Message-
 From: Rey Bango [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 19, 2006 11:39 AM
 To: CF-Talk
 Subject: Re: Extract email(s) from non-delivered message
 
 You're absolutely right Claude. What I was planning on doing is 
 tweaking the script as I found emails formatted differently and 
 eventually have a nice library of formats setup.
 
 I'll look at CF_REExtract to see if it can help as well.
 
 Thanks,
 
 Rey./..
 
 Claude Schneegans wrote:
 
 I need to extract emails from non-delivered messages.

The problem is that there are not two servers that will return 
messages with the same syntax.
If you only send messages to Yahoo, fine, but what if you send 
messages to other types of servers?

Anyway, if you need to parse something, your best solution will be 
CF_REExtract.
See : 
http://www.contentbox.com/claude/customtags/REextract/testREextract.cf
m

 
 
 
 
 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238120
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Claude Schneegans
 What I was planning on doing is tweaking
the script as I found emails formatted differently and eventually have a
nice library of formats setup.

Then REExtract will definitely make your life easier!
The idea is that it is sometimes much easier to describe what's around 
the string you are
searching, than the string itself, because what's around is fixed, but 
the searched string may
be quite fuzzy.

You can test the tag by yourself online :
http://www.contentbox.com/claude/customtags/REextract/testingREextract.cfm
1. enter yahoo.com account \( in RE1 (omit the quotes)
3. enter \) in RE2
4. enter your sample in the Sample text textarea,
5. click on the Test button.
and see the result Query with the three addresses in column String2.

It should be as easy for all other types of messages you get.


-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238121
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Claude Schneegans
 But assuming its valid email source.

That's the problem, especially for messages rejected by the server 
because they are invalid ;-/

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238122
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Rey Bango
Gotcha. The regex from the prior email is working great so I'm going to 
go with that for now.

Again, I really appreciate your help bud.

Rey...

Ben Nadel wrote:
 Rey,
 
 Glad I could help... I am sure there is a better way to make the RegExp,
 using the shorthand notation, but I am not an expert on those:
 
 [EMAIL PROTECTED] 
 
 Samd as...
 
 [EMAIL PROTECTED]
 
 Where \w is word characters and \d is digit characters... But can never
 remember what exactly whey stand for.
 
 -ben
 ...
 Ben Nadel 
 www.bennadel.com
 
 -Original Message-
 From: Rey Bango [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 19, 2006 12:00 PM
 To: CF-Talk
 Subject: Re: Extract email(s) from non-delivered message
 
 That did the trick!! Awesome man!
 
 Rey...
 
 Ben Nadel wrote:
 
Rey,

If you are unsure of the email type... You might want to try the reg exp:

If you want to be variable for type, you can try this:

[EMAIL PROTECTED]  for the RegExp.

Matches any string containg the following characters a-z A-Z 0-9 - . _  
AND has at least one @

Might match some crazy strings through like [EMAIL PROTECTED]@ben

But assuming its valid email source... Should be good.

...
Ben Nadel
www.bennadel.com

-Original Message-
From: Rey Bango [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 19, 2006 11:39 AM
To: CF-Talk
Subject: Re: Extract email(s) from non-delivered message

You're absolutely right Claude. What I was planning on doing is 
tweaking the script as I found emails formatted differently and 
eventually have a nice library of formats setup.

I'll look at CF_REExtract to see if it can help as well.

Thanks,

Rey./..

Claude Schneegans wrote:


I need to extract emails from non-delivered messages.

The problem is that there are not two servers that will return 
messages with the same syntax.
If you only send messages to Yahoo, fine, but what if you send 
messages to other types of servers?

Anyway, if you need to parse something, your best solution will be 
CF_REExtract.
See : 
http://www.contentbox.com/claude/customtags/REextract/testREextract.cf
m






 
 
 
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238123
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Extract email(s) from non-delivered message

2006-04-19 Thread Rey Bango
You've been blogged. :)

http://weblogs.macromedia.com/mxna/index.cfm?query=byFeedfeedId=556feedName=Rey%20Bango

Thanks again.

Rey...

Ben Nadel wrote:
 Rey,
 
 Glad I could help... I am sure there is a better way to make the RegExp,
 using the shorthand notation, but I am not an expert on those:
 
 [EMAIL PROTECTED] 
 
 Samd as...
 
 [EMAIL PROTECTED]
 
 Where \w is word characters and \d is digit characters... But can never
 remember what exactly whey stand for.
 
 -ben
 ...
 Ben Nadel 
 www.bennadel.com
 
 -Original Message-
 From: Rey Bango [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 19, 2006 12:00 PM
 To: CF-Talk
 Subject: Re: Extract email(s) from non-delivered message
 
 That did the trick!! Awesome man!
 
 Rey...
 
 Ben Nadel wrote:
 
Rey,

If you are unsure of the email type... You might want to try the reg exp:

If you want to be variable for type, you can try this:

[EMAIL PROTECTED]  for the RegExp.

Matches any string containg the following characters a-z A-Z 0-9 - . _  
AND has at least one @

Might match some crazy strings through like [EMAIL PROTECTED]@ben

But assuming its valid email source... Should be good.

...
Ben Nadel
www.bennadel.com

-Original Message-
From: Rey Bango [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 19, 2006 11:39 AM
To: CF-Talk
Subject: Re: Extract email(s) from non-delivered message

You're absolutely right Claude. What I was planning on doing is 
tweaking the script as I found emails formatted differently and 
eventually have a nice library of formats setup.

I'll look at CF_REExtract to see if it can help as well.

Thanks,

Rey./..

Claude Schneegans wrote:


I need to extract emails from non-delivered messages.

The problem is that there are not two servers that will return 
messages with the same syntax.
If you only send messages to Yahoo, fine, but what if you send 
messages to other types of servers?

Anyway, if you need to parse something, your best solution will be 
CF_REExtract.
See : 
http://www.contentbox.com/claude/customtags/REextract/testREextract.cf
m






 
 
 
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238124
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Extract email(s) from non-delivered message

2006-04-19 Thread Munson, Jacob
\w is any alphanumeric character, so the \d is redundant.  :) 

 -Original Message-
 From: Ben Nadel [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 19, 2006 10:05 AM
 
 Glad I could help... I am sure there is a better way to make 
 the RegExp,
 using the shorthand notation, but I am not an expert on those:
 
 [EMAIL PROTECTED] 
 
 Samd as...
 
 [EMAIL PROTECTED]
 
 Where \w is word characters and \d is digit characters... But 
 can never
 remember what exactly whey stand for.


[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law.  If you are not the 
intended recipient, you are hereby notified that any disclosure, copying, 
distribution, or use of the information contained herein (including any 
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in 
error, please immediately contact the sender and destroy the material in its 
entirety, whether in electronic or hard copy format.  Thank you.   A2



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238190
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Extract email(s) from non-delivered message

2006-04-19 Thread Ben Nadel
Thanks, I can never remember those for some reason.

-b 
...
Ben Nadel 
www.bennadel.com

-Original Message-
From: Munson, Jacob [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 19, 2006 3:25 PM
To: CF-Talk
Subject: RE: Extract email(s) from non-delivered message

\w is any alphanumeric character, so the \d is redundant.  :) 

 -Original Message-
 From: Ben Nadel [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 19, 2006 10:05 AM
 
 Glad I could help... I am sure there is a better way to make the 
 RegExp, using the shorthand notation, but I am not an expert on those:
 
 [EMAIL PROTECTED]
 
 Samd as...
 
 [EMAIL PROTECTED]
 
 Where \w is word characters and \d is digit characters... But can 
 never remember what exactly whey stand for.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238192
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Extract email(s) from non-delivered message

2006-04-18 Thread Rey Bango
I need to extract emails from non-delivered messages. Anyone have some 
sample code they'd be willing to share in order to get this done? Below 
is a sample of the non-delivery notice. Notice how it has 3 emails 
embedded into it. I need to grab those. Before I go off and write 
something, I'd like to see if there's something already built to handle 
this:

 Original Message 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Delivery failure
Date: Tue, 18 Apr 2006 10:28:23 -0500

 Message from yahoo.com.
 Unable to deliver message to the following address(es).
 
 [EMAIL PROTECTED]:
 This user doesn't have a yahoo.com account ([EMAIL PROTECTED]) [0]
 
 [EMAIL PROTECTED]:
 This user doesn't have a yahoo.com account ([EMAIL PROTECTED]) [0]
 
 [EMAIL PROTECTED]:
 This user doesn't have a yahoo.com account ([EMAIL PROTECTED]) [-5]
 
 --- Original message follows.
 
 X-Originating-IP: [72.3.251.114]
 Return-Path: [EMAIL PROTECTED]
 Authentication-Results: mta120.mail.mud.yahoo.com
   from=tropicaltraditions.com; domainkeys=neutral (no sig)
 Received: from 72.3.251.114  (EHLO 62763-web1.dfw.intensive.int)
 (72.3.251.114)
   by mta120.mail.mud.yahoo.com with SMTP; Tue, 18 Apr 2006 08:28:21
 -0700
 Received: from [127.0.0.1] (unverified [209.42.54.129]) by
 tropicaltraditions.com
  (Rockliffe SMTPRA 6.1.22) with ESMTP id
 [EMAIL PROTECTED] for
 [EMAIL PROTECTED];
  Tue, 18 Apr 2006 10:27:52 -0500
 Message-ID: [EMAIL PROTECTED]
 Date: Tue, 18 Apr 2006 11:27:56 -0400
 From: Rey Bango [EMAIL PROTECTED]
 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
 X-Accept-Language: en-us, en
 MIME-Version: 1.0
 To:  [EMAIL PROTECTED]
 Subject: Test to see if emails bounce
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 Sender: [EMAIL PROTECTED]
 
 Test to see if emails bounce
 
 
 *** MESSAGE TRUNCATED ***



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238058
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54