email address verify and cleanup script?

This is a discussion on email address verify and cleanup script? within the PHP Language forums, part of the PHP Programming Forums category; Is there anyway to verify an email address before you send it? Does anyone know of a way to clean ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2004
NotGiven
 
Posts: n/a
Default email address verify and cleanup script?

Is there anyway to verify an email address before you send it?

Does anyone know of a way to clean up an email address, like check for "me
@theend.co"

The above has a space before "@" and is jissing a "M" in "com".

If you have any ideas or know of an existing script to do this, please send
or link. Thanks!


Reply With Quote
  #2 (permalink)  
Old 01-16-2004
Pedro Graca
 
Posts: n/a
Default Re: email address verify and cleanup script?

NotGiven wrote:
> Is there anyway to verify an email address before you send it?

No.


But you can try to make sure it is valid.
Here is a regexp to do it
http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html

The page does not specifically say anything about PHP, but I believe it
works (never tested it though)
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Reply With Quote
  #3 (permalink)  
Old 01-16-2004
Daniel Tryba
 
Posts: n/a
Default Re: email address verify and cleanup script?

NotGiven <noname@nonegiven.net> wrote:
> Is there anyway to verify an email address before you send it?


No.

> Does anyone know of a way to clean up an email address, like check for "me
> @theend.co"
>
> The above has a space before "@" and is jissing a "M" in "com".


There is no missing m in the example above. .co is the tld for Columbia.

The space is invalid, the exact syntax of an emailaddress is defined in
rfc 822 (in chapter 6). But don't put to much effort into this, because
a syntactically valid emailaddress doens't have to exist..

--

Daniel Tryba

Reply With Quote
  #4 (permalink)  
Old 01-16-2004
CountScubula
 
Posts: n/a
Default Re: email address verify and cleanup script?

"NotGiven" <noname@nonegiven.net> wrote in message
news:pSFNb.2510$0t4.959@bignews5.bellsouth.net...
> Is there anyway to verify an email address before you send it?
>
> Does anyone know of a way to clean up an email address, like check for "me
> @theend.co"
>
> The above has a space before "@" and is jissing a "M" in "com".
>
> If you have any ideas or know of an existing script to do this, please

send
> or link. Thanks!
>
>


this may give you a good head start

http://www-4.gzentools.com/snippetvi...v=emailval.php

--
Mike Bradley
http://www.gzentools.com -- free online php tools


Reply With Quote
  #5 (permalink)  
Old 01-16-2004
NotGiven
 
Posts: n/a
Default Re: email address verify and cleanup script?

I'm trying to figure out a way to weed through email addresses before I send
them out and get TONS of returned mail.


"NotGiven" <noname@nonegiven.net> wrote in message
news:pSFNb.2510$0t4.959@bignews5.bellsouth.net...
> Is there anyway to verify an email address before you send it?
>
> Does anyone know of a way to clean up an email address, like check for "me
> @theend.co"
>
> The above has a space before "@" and is jissing a "M" in "com".
>
> If you have any ideas or know of an existing script to do this, please

send
> or link. Thanks!
>
>



Reply With Quote
  #6 (permalink)  
Old 01-16-2004
Tim Van Wassenhove
 
Posts: n/a
Default Re: email address verify and cleanup script?

On 2004-01-16, NotGiven <noname@nonegiven.net> wrote:
> Is there anyway to verify an email address before you send it?
>
> Does anyone know of a way to clean up an email address, like check for "me
> @theend.co"
>
> The above has a space before "@" and is jissing a "M" in "com".
>
> If you have any ideas or know of an existing script to do this, please send
> or link. Thanks!


You could write your own function that looks up the MX or A of a given
domain. And then try to deliver a message for the given user. The server
will then reply if that user exists or not.

But i think there are already classes out there that do that.
Although i dont like the site, i think they should have a look at
http://www.phpclasses.org


--
http://home.mysth.be/~timvw
Reply With Quote
  #7 (permalink)  
Old 01-16-2004
Manuel Lemos
 
Posts: n/a
Default Re: email address verify and cleanup script?

Hello,

On 01/15/2004 10:47 PM, NotGiven wrote:
> I'm trying to figure out a way to weed through email addresses before I send
> them out and get TONS of returned mail.


You may want to try this class as it does exactly what you are asking:

http://www.phpclasses.org/emailvalidation

Anyway, keep in mind that the class itself can't assure that one address
that is not invalidated by the destination SMTP server may still be
invalid because some SMTP servers only bounce messages sent to invalid
addresses after those messages are accepted for delivery.

While not perfect, the solution of this class is much better than
nothing though.


> "NotGiven" <noname@nonegiven.net> wrote in message
> news:pSFNb.2510$0t4.959@bignews5.bellsouth.net...
>
>>Is there anyway to verify an email address before you send it?
>>
>>Does anyone know of a way to clean up an email address, like check for "me
>>@theend.co"
>>
>>The above has a space before "@" and is jissing a "M" in "com".
>>
>>If you have any ideas or know of an existing script to do this, please

>
> send
>
>>or link. Thanks!



--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

Reply With Quote
  #8 (permalink)  
Old 01-16-2004
Chung Leong
 
Posts: n/a
Default Re: email address verify and cleanup script?

Hmmm, does that really work for all SMTP servers? I thought user checking is
usually done by the delivery agent.

I miss the days when you can finger an account to see if it exists.

Uzytkownik "Tim Van Wassenhove" <euki@pi.be> napisal w wiadomosci
news:bu7e3q$egnkt$1@ID-188825.news.uni-berlin.de...
> You could write your own function that looks up the MX or A of a given
> domain. And then try to deliver a message for the given user. The server
> will then reply if that user exists or not.



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0