We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Extended Mass Mail By JK | Forum

Topic location: Forum home » Support » General Questions
Marcus
Marcus May 3 '20
heres a little hint. create crop job then simply change user email preferences to never
The Forum post is edited by Marcus May 3 '20
dave Leader
dave May 3 '20

There are ways to validate an email address domain using php such as this little function here.. its one way to sort out fakes. 


function isValidEmail($value)
{

    if (filter_var($value, FILTER_VALIDATE_EMAIL) == FALSE)
    {
        return 0;
    }

    //explode out firstpart and secondpart
    //local and domain names
    list($firstpart, $secondpart) = explode('@', $value);

    $firstLength = strlen($firstpart);
    $secondLength = strlen($secondpart);
   
    //check for lengths and if valid MX or A record
    if( $firstLength > 0 && $firstLength < 65 && $secondLength > 3 && $secondLength < 256 && (checkdnsrr($secondpart, 'MX') || checkdnsrr($secondpart, 'A')) )
    {
       
     return 1;  //valid
       
    }else{
        
         return 0; //not valid
          
         }
   
}// close function isValidEmail




Marcus
Marcus May 3 '20
nice Dave, im at work on my lunch break right now so cant really be sure but aint oxwall has similar is email valid class? or is there any event triggerd before email gets saved in db? 
The Forum post is edited by Marcus May 3 '20
dave Leader
dave May 3 '20
I dont know i have never looked that deeply at the email process... I use that validate process on my other projects so i figured it would share it.
Patricia Zorrilla Leader
Patricia Zorrilla May 3 '20

Look at the EmailValidator class in ow_core/validator.php

maybe I'll give you a hint


Pages: « 1 2