MACSCRPT Archives

December 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Le Stang Jean-Baptiste <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 5 Dec 2006 09:06:31 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (75 lines)
You can also have a look to XMail and it 'encode email address',  
there is an embedded email parser in XMail (http://www.lestang.org/ 
osax/XMail/) that will allow you to discard some of the badly formed  
e-mail addresses.


encode email address "azeaze <[log in to unmask]>"
	-> result is not missing valuer => should be a valid email address


encode email address "my name@my company.com"
	-> result is missing value => the email address is badly formated

> Be aware that nothing is easier than finding lots of invalid  
> addresses which will return true: for instance, addresses with kanji.

=> http://en.wikipedia.org/wiki/E-mail_address

When I'm reading this, I do not see how kanjis can be used in email  
addresses except using the following form of addressing : "the is my  
name full of kanjis <[log in to unmask]>", can you confirm that  
this what you meant?

Jean-Baptiste LE STANG

On Dec 4, 2006, at 11:22 PM, Emmanuel wrote:

> At 3:54 PM -0500 12/4/06, Jeramey Valley wrote:
>> I have a list of email addresses*. Some of the addresses in the  
>> list are not of correct form, meaning they may have a space, extra  
>> period or other no-no in the address.
>>
>> Examples:
>>
>> someDude@gmail..com
>> my name@my company.com
>>
>> What's the best way to test and fix the errors in this list?
>>
>> My plan was to use the regex function in the Satimage addition and  
>> perform a pattern replace. I would be creating the pattern from  
>> scratch.
>>
>> Has anyone gone through and created the most common pattern  
>> matches they would like to share or have a better solution?
>
> I would advise using Apple's strategy, which checks first that it  
> "looks like" an e-mail address, then searches for gremlins. That's  
> at <http://developer.apple.com/internet/webcontent/ 
> validation.html>, but it's javascript.
>
> We use the following variante:
>
> on isvalidemail(x)
> 	try
> 		ufind text "[log in to unmask]\\..{2,3}$" in x with regexp
> 	on error
> 		return false
> 	end try
>
> 	try
> 		ufind text "[áàâäéèêëíìîïóòôöúùûüÿ()<>,;:\\\\/\"\\[\\]]" in x  
> with regexp
> 		return false
> 	end try
>
> 	return true
> end isvalidemail
>
>
> Be aware that nothing is easier than finding lots of invalid  
> addresses which will return true: for instance, addresses with kanji.
>
> Emmanuel

ATOM RSS1 RSS2