[WAITING VALIDATION] Validate email

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
Saubloed
Registered User
Posts: 42
Joined: Fri Aug 24, 2001 2:56 pm
Location: Germany
Contact:

Post by Saubloed »

Can someone fix the Hotmail bug? :(
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

mod update

Post by Niels Chr. Denmark »

to Saubloed and others...
This mod have now been update
this is how to update to version 0.9.2

in file includes/functions_validate.php

Code: Select all

[FIND]
fputs ( $Connect, "HELO $HTTP_HOST\r\n" ); 

[REPLACE WITH]
global $board_config;
fputs ( $Connect, "HELO ".$board_config['sitename']."\r\n" ); 
thats it,
demo at my site
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

I have now updated this to version 0.9.3, to fix that some other email servers also can be verifyed, the problem seams to be that there are different responces for different type of email servers

the newest version should handle a more "open" syntax, and therefore be able to deal with different servers

I have tested on my own email server, aol.com, yahoo.com, hotmail.com
if anyone finds a server by witch this mod can not verify a users email, then please inform me, and supply with the client as well as the serves address so I can test with this

Here are how to upgrade from version 0.9.2 -> 0.9.3

Code: Select all

[FIND] 

if ($Connect) 
{ 
   // Connect to SMTP OK, email client 
   if ( ereg ( "^220", $Out = fgets ( $Connect, 1024 ) ) ) 
   { 
      global $board_config; 
      fputs ( $Connect, "HELO ".$board_config['sitename']."\r\n" ); 
      $Out = fgets ( $Connect, 1024 ); 
      fputs ( $Connect, "MAIL FROM: <{$email}>\r\n" ); 
      $From = fgets ( $Connect, 1024 ); 
      fputs ( $Connect, "RCPT TO: <{$email}>\r\n" ); 
      $To = fgets ( $Connect, 1024 ); 
      fputs ( $Connect, "QUIT\r\n"); 
      fclose($Connect); 
      if ( !ereg ( "^250", $From ) || !ereg ( "^250", $To )) 
      { 
         return array('error' => true, 'error_msg' => $lang['Client_not_verifyed']); 
      } 
   } 
} 
else 
{ 
   return array('error' => true, 'error_msg' => $lang['No_connect_server']); 
} 

[REPLACE] 
if ($Connect) 
{ 
   // Connect to SMTP OK, email client 
   if ( ereg ( "^220",  $Out = fgets ( $Connect, 1024 ) ) ) 
   { 
      global $board_config; 
      fputs ( $Connect, "HELO ".$board_config['sitename']."\r\n" ); 
      while (ereg ( "^220", $Out) ) 
      { 
         $Out = fgets ( $Connect, 1024 ); 
      } 
      fputs ( $Connect, "MAIL FROM: <".$email.">\r\n" ); 
      $From = fgets ( $Connect, 1024 ); 
      fputs ( $Connect, "RCPT TO: <".$email.">\r\n" ); 
      $To = fgets ( $Connect, 1024 ); 
      fputs ( $Connect, "QUIT\r\n"); 
      fclose($Connect); 
      if ( !ereg ( "^250", $From ) || !ereg ( "^250", $To )) 
      { 
         return array('error' => true, 'error_msg' => $lang['Client_not_verifyed']); 
      } 
   } 
   else message_die(GENERAL_ERROR, "Error, verifying client email.", "", __LINE__, __FILE__, $ConnectAddress.$errorstr); 
    
} 
else 
{ 
   return array('error' => true, 'error_msg' => $lang['No_connect_server']); 
} 
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

This mod is now considerd as final

those users witch have had truble, have turned out using a wrong email, or did have other problems, so far I'm not aware of any emails, witch can not be "verifyed" as true or false

if anyone know of a "true" email, witch can not be verifyed by the mod, then please report this to me (I will need the full email to test with)
_Haplo
Registered User
Posts: 587
Joined: Wed Jul 10, 2002 7:57 pm
Location: Sweden
Contact:

Post by _Haplo »

its great now...thanx a bunch :-)
www.mx-publisher.com - modular CMS for phpBB
News: MXP 3.0.x released!
John-KiaX
Registered User
Posts: 41
Joined: Thu Oct 10, 2002 2:35 pm

Post by John-KiaX »

excelent work man!
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

I have updated rhe code, see this post on how-to upgrade

http://mods.db9.dk/viewtopic.php?p3183#3183
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

I have now upgraded this mod, so you as admin can ban all types of emails, and at the same time make a "allow email list"

this will make it posible to only open the forum for specific emails

e.g. if you would like to ONLY open registration for emails of the type @db9.dk

you will first put this in the email ban list

*@*.*

then to allow the *@db9.dk, you must put in this in the email ban list
*:db9.dk

note that @ is substituded with the :, this indicate that this is a POSITIVE ban list, witch will grant ACCESS for that email matching this.


the new code is considerd as beta, please test and feed back
tradertt
Registered User
Posts: 180
Joined: Sat Nov 16, 2002 4:52 pm
Contact:

Post by tradertt »

Can i just chk something .. what is this validate email actually for? What is the difference between getting phpbb to send a password to a persons email to validate that that email account is active and yours? Sorry for the ignorance .. cause I dun understand the main use .. other than the ALLOW ONLY CERTIAN DOMAIN EMAIL TO REGISTER FUNCTIOn :D
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

this mod will prevent users from using non existing email accounts

This is usefull if you wish to run a forum, without "account activation" but still need your users to submit there true email.

they will only be able to submit a exiting email account, not some fake one
this "true" email will recive the "welcome email" so if the email does not belong to the user, the owner will now that his email have been used by someone else

as it is on standart phpbb2, any email witch have a valid syntax can be used
e.g. "none@no-domain.mis" would be allowed, even though no sutch email exist
tradertt
Registered User
Posts: 180
Joined: Sat Nov 16, 2002 4:52 pm
Contact:

Post by tradertt »

Ahh.. okie .. concerning your new mod which allows only CERTAIN domain to register like *@yahoo.com while those without this email cannot register.. Do I have the additional option to get them to validate their account via their email again?
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

I have not changed anything about how the "account activation" works, if this is what you are asking, so expect that to work as usual
"allowed email" are resiving a acount activation email, if this is turned on


(some users have requested, that depending on the submitted email, different levels of account activation should be posible - this is how ever not implemented in this mod....yet)
Earth should spin a litle slower, then there would be 28H/dayImage
jasonlee
Registered User
Posts: 21
Joined: Fri Oct 18, 2002 6:11 am

Post by jasonlee »

Fatal error: Cannot redeclare checkdnsrr()
in /var/www/html/forum/includes/functions_validate.php on line 25


i am running linux, any idea why i am recieving this message after i click on " I agree " from the agreement page before registeration?
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

jasonlee wrote: Fatal error: Cannot redeclare checkdnsrr()
in /var/www/html/forum/includes/functions_validate.php on line 25


i am running linux, any idea why i am recieving this message after i click on " I agree " from the agreement page before registeration?


I asume you have tryed to do the linux part, witch inded are recormended
remember though, that the functions added to the file functions_validated.php

Code: Select all

function checkdnsrr_winNT( $host, $type = '' ) 
{
.
.
}
function getmxrr_winNT( $hostname, &$mxhosts )
{
.
.
}
are not nessesary due to the fact that they are included into the LINUX version of php

You will simply need to change the name when they are called in the functions_validate.php, this is done in the function Validate_email()

For linux, In short:
remove the _winNT any where in the functions_validate.php (I guess you already done so), and remove the 2 functions as described above
Earth should spin a litle slower, then there would be 28H/dayImage
jasonlee
Registered User
Posts: 21
Joined: Fri Oct 18, 2002 6:11 am

Post by jasonlee »

heh thanx.. taking out the functions from function_validate.php worked..
its working fine on my forum now..

i do have some questions still tho,
are there known bugs for this mod? which will cause some real mail addresses fail to register?

i tried registering a user, the validating process was slow @@
there anyway to fix it ? :)

Great mod tho, thanx for all who developed it!
Post Reply

Return to “[2.0.x] MODs in Development”