Completing email registration via POP3

captchaman

Junior Member
Joined
Sep 16, 2010
Messages
192
Reaction score
848
I use .NET, but it's not really a language specific problem as I can figure out the code myself.

How would one go about this - download all email and then look for the registration URL? I haven't messed with POP in a while now so I figured I should ask here.
 
1) Clear your catchall account before each sign up.
2) Do your signup.
3) Check your catchall account - normally you will download all the mails by default. You provide user / pass as part of the authentication process.
4) Check each email for the right from address (eg. regex against the domain name if you know where the email is coming from).
5) Within that email, regex the confirmation url. If you already know the format of the email, sometimes it's easier just extract the urls in the email body and then fetch the first one (or second, or third, or wherever in the list you know the confirmation url will be).
6) Clear mail before next signup or just delete that mail.

Of course you don't strictly need to clear the mailbox before each signup (and you can't if you're multithreading) but it makes thing easier.

I'm a PHP user myself but I'm sure there must be tons of POP3 classes out there for $language_of_choice
 
That helped me out a lot, thanks Autumn.
 
If you don't want to spend the time to develop your own POP3 class, you should try OpenPOP.
 
Back
Top