You are here: Re: php and email authentivation « PHP Programming Language « IT news, forums, messages
Re: php and email authentivation

Posted by Jerry Stuckle on 12/16/17 11:57

giangiammy wrote:
> hi all,
>
> i need a framework to set up a web service with email authentication:
> that is, I need the user to insert his/her email, I send him/her a code
> via email and when the confirm email arrives, the user is confirmed:
> it is done in various web services, nothing new :-(
>
> But how can I do it? I have seen various CMS which get the
> subscription,
> but not the mail confirmation: I obviously need to intercept incoming
> mail to
> to check, but how is it done in php?
>
> thanks
> giammy
>

It depends on your MTA. If your agent allows it, you could pipe the
incoming message to a batch file and parse the incoming mail. If not,
you can run a cron job every few minutes to check the mail queue and get
the mail.

In the latter case it depends if you're using IMAP or POP3 mail. You
can look up the necessary commands in the RFC's.

For instance, for POP3 you would want to open a socket to the mail
server's port 110, issue the USER and PASS commands. Then you can LIST
the mail in the box and RETR them one by one. When done with a message,
you can DELE it. When you've completed processing of the mailbox you
can QUIT.

You can also execute these commands from a telnet session to see what
the responses look like.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация