Grega Leskovsek wrote:
> how is the best way to check if email address is valid: is this preg_match() 
> OK?
> preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/',
> $email);

filter_var($email, FILTER_VALIDATE_EMAIL)

> How can I make double opt-in mail system? My idea:
> 1.) I remember the email entered and user data and the sha1($email);
> in mysql db
> 2.) I send email with activation link of the sha1($email);
> 3.) I am not clear how to proceed when the link is activated. How to
> update the db and submit the necessary form to the marketing.

When the user clicks the activation link, mark the address active in the
subscribers table, or move the entry from a pending table to a
subscribers table.  Then execute the email/whatever to marketing just as
you would without using double opt-in.

> Thanks in advance,


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to