Could someone help me fix this newsletter script?

Discussion in 'PHP' started by x0x, Feb 17, 2010.

  1. #1
    I have newseltter script that I use to email my customers, but it doesn't seem to work properly anymore. At some point it runs to this weird error:


    Error: invalid address value on MAIL5->addto() in /home/me123/public_html/nav/sending.php on line 78

    OR

    Error: invalid address value on MAIL5->addto() in /home/me123/public_html/nav/sending.php on line 96


    It could be an invalid email in the database but I have over 70k emails and it' really hard to find them. Would be a lot easier to fix the newsletter script.


    Here is the sending.php file:


    <?php
    
    
    
    
     
    
    
    
    
    
    $expected = array('b', 's', 'o', 't', 'e');
    foreach ($_GET as $newkey => $newvalue) {
        if (in_array($newkey, $expected)) {
            ${$newkey} = $newvalue;
        }
    }
    $dir = __file__;
    $dir = str_replace('sending.php', '', $dir);
    $dir .= 'conn.inc';
    $fd = fopen($dir, "r");
    while (!feof($fd)) {
        $buffer = fgets($fd, 4096);
        $lines[] = $buffer;
    }
    fclose($fd);
    $server = str_replace("\n", '', $lines[0]);
    $username = str_replace("\n", '', $lines[1]);
    $password = str_replace("\n", '', $lines[2]);
    $database = str_replace("\n", '', $lines[3]);
    $table = str_replace("\n", '', $lines[4]);
    $email = str_replace("\n", '', $lines[5]);
    $speed = str_replace("\n", '', $lines[6]);
    $burst = str_replace("\n", '', $lines[7]);
    $wheres = str_replace("\n", '', $lines[8]);
    $switch = str_replace("\n", '', $lines[9]);
    $username = ENCRYPT_DECRYPT($username);
    $server = ENCRYPT_DECRYPT($server);
    $database = ENCRYPT_DECRYPT($database);
    $password = ENCRYPT_DECRYPT($password);
    $table = ENCRYPT_DECRYPT($table);
    $email = ENCRYPT_DECRYPT($email);
    $wheres = ENCRYPT_DECRYPT($wheres);
    $switch = ENCRYPT_DECRYPT($switch);
    $stat = mysql_connect($server, $username, $password);
    $db = mysql_select_db($database, $stat);
    if ($wheres) {
    $numrows = mysql_query('SELECT COUNT(*) FROM '.$table.' WHERE '.$email.'!="" AND '.$wheres.'="'.$switch.'"');
    } else {
    $numrows = mysql_query("SELECT COUNT(*) FROM " . $table . " WHERE " . $email .
        " !='' ");
    
    }
    $counter = mysql_fetch_array($numrows);
    $e = $counter[0];
    $b = $burst;
    $s = $speed;
    $bt = 0;
    $dir = __file__;
    $dir = str_replace('nav/sending.php', '', $dir);
    $dir .= 'nav/';
    $myFile = $dir . 'genpre.html';
    $fh = fopen($myFile, 'r');
    $fullemail = fread($fh, filesize($myFile));
    fclose($fh);
    require_once '../mail/MAIL.php';
    
    while ($bt != $b) {
        if ($t == 0) {
        	if ($wheres) {
    			$query = mysql_query('SELECT * FROM '.$table.' WHERE '.$email.'!="" AND '.$wheres.'="'.$switch.'" LIMIT 1');
    		} else {
            $query = mysql_query("SELECT * FROM " . $table . " WHERE " . $email .
                "!='' LIMIT 1") or die(mysql_error());
                }
    
        } else {
        	if ($wheres) { // LINE 78
    			$query = mysql_query('SELECT * FROM '.$table.' WHERE '.$email.'!="" AND '.$wheres.'="'.$switch.'" LIMIT 1 OFFSET '. $t);
    		} else {
            $query = mysql_query("SELECT * FROM " . $table . " WHERE " . $email .
                "!='' LIMIT 1 OFFSET " . $t . ' ') or die(mysql_error());
    		}
        }
    
        while ($row = mysql_fetch_array($query)) {
            $toemail = $row[$email];
        }
       
        require_once 'header.php';
        $isvalid = verify_email($toemail);
        if ($isvalid == false) { $toemail = ''; }
        if ($toemail){
        $m = new MAIL;
        $m->From(stripslashes($fromemail), stripslashes($display));
        $m->AddTo($toemail); // LINE 96
        $m->Subject(stripslashes($subject));
        $m->Html($fullemail);
    //$c = $m->Connect('mail.hostname.com', 25, 'username', 'password') or die(print_r($m->Result));
        $m->Send() ? '' : 'Error.';
    	}
    	else { $skipped=$skipped+1; }
    	
        $bt = $bt + 1;
        $t = $t + 1;
        if ($t == $counter[0]) {
            $bt = $b;
            $complete = true;
        }
    }
    if ($counter[0] != $t) {
        header('Refresh: ' . $s . ';url=?t=' . $t.'&sk='.$skipped);
    }
    $value = (100 / $counter[0]);
    $value = $value * $t;
    $value = ceil($value);
    if ($complete) {
        echo '<div align="center"><h2>Complete!</h2>Sent ' . $t . ' emails.</div>';
    } else {
        build_bar($value, $t, $counter[0], $s);
    }
    
    function build_bar($value, $t, $e, $s)
    {
        echo '<div align="center">';
        echo '<table border="0" width="300"><tr><td align="left" width="200">';
        $newval = $value * 2;
        if ($newval >= 200) {
            $newval = 200;
        }
        echo '<table border="0" width="200" bgcolor="gray"><tr><td width="' . $newval .
            '" bgcolor="navy">';
        if ($value >= 1) {
            echo '&nbsp;';
        }
        echo '</td><td></td></tr></table>';
        echo '</td><td align="center"><a href="?t=' . $t . '">Recover</a></td>';
        echo '</td></tr></table>';
        echo $value . '% Complete<br>' . $t . ' Emails Sent - ' . $e .
            ' Addresses Found<br>'.$_GET['sk'].' - Skipped';
        echo '</div>';
    }
    
    function verify_email($email){
    
        if(!preg_match('/^[_A-z0-9-]+((\.|\+)[_A-z0-9-]+)*@[A-z0-9-]+(\.[A-z0-9-]+)*(\.[A-z]{2,4})$/',$email)){
            return false;
        } else {
            return $email;
        }
    }
    
    function ENCRYPT_DECRYPT($Str_Message)
    {
        $Len_Str_Message = STRLEN($Str_Message);
        $Str_Encrypted_Message = "";
        for ($Position = 0; $Position < $Len_Str_Message; $Position++) {
            $Key_To_Use = (($Len_Str_Message + $Position) + 1);
            $Key_To_Use = (255 + $Key_To_Use) % 255;
            $Byte_To_Be_Encrypted = SUBSTR($Str_Message, $Position, 1);
            $Ascii_Num_Byte_To_Encrypt = ORD($Byte_To_Be_Encrypted);
            $Xored_Byte = $Ascii_Num_Byte_To_Encrypt ^ $Key_To_Use;
            $Encrypted_Byte = CHR($Xored_Byte);
            $Str_Encrypted_Message .= $Encrypted_Byte;
        }
        return $Str_Encrypted_Message;
    }
    ?>
    PHP:


    I've added comments where line 78 and 96 are. Any ideas guys? To make it skip the invalid emails instead of crashing?
     
    x0x, Feb 17, 2010 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    omg im lost.. wats on line 78 and 96?
     
    bartolay13, Feb 17, 2010 IP
  3. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #3
    I added comments in case you missed them:

    if ($wheres) { // LINE 78



    and



    $m->AddTo($toemail); // LINE 96



    I don't understand this at all. I can't do OO PHP...
     
    x0x, Feb 17, 2010 IP
  4. Marshton

    Marshton Peon

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    As you said I think its an invalid email in the database, and the only way to make the script work is to make sure that the 'rouge' email is valid before sending it, which, it looks like it has already done, and this is far too complicated for me to work out, so good luck with it.
     
    Marshton, Feb 17, 2010 IP
  5. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #5
    my registration page has got a pretty good regex to filter out invalid emails... it must be something simple. kinda impossible to go through all the emails if i dont know what im looking for
     
    x0x, Feb 17, 2010 IP
  6. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #6
    any other ideas? maybe there's an easy way to make it skip invalid emails to avoid crashing? php gurus?
     
    x0x, Feb 17, 2010 IP
  7. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Just print out each email address before sending it to the problem function. The last one that gets displayed will be the one that caused the error.
     
    SmallPotatoes, Feb 18, 2010 IP
  8. Marshton

    Marshton Peon

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I don't like geniuses >: )

    That would work....

    Wow!

    [=
     
    Marshton, Feb 18, 2010 IP
  9. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #9
    I don't want to send out another invalid email letter. I guess it could be changed to only go through the emails and skip the sending part. But not sure how to do that.

    Also, does anyone know how I can use a regex to pull emails using an SQL command?

    /^[_A-z0-9-]+((\.|\+)[_A-z0-9-]+)*@[A-z0-9-]+(\.[A-z0-9-]+)*(\.[A-z]{2,4})$/

    I could pull them out manually.
     
    x0x, Feb 19, 2010 IP
  10. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #10
    nobody?......
     
    x0x, Feb 19, 2010 IP
  11. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #11
    <?php
    
    $string = "hello my email is something@hotmail.co.uk";
    
    preg_match_all("/([a-z0-9\-_\.]*@[a-z0-9\-]*\.[a-z\.]{2,6})/i", $string, $matches);
    print_r($matches[0]);
    
    
    ?>
    PHP:
    Use preg_match_all to pull emails out, emails are in an array, which means you can pull them out manually...
     
    Last edited: Feb 19, 2010
    danx10, Feb 19, 2010 IP
  12. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #12
    Found the invalid email type:



    Doesn't seem like something that would cause an error.


    Could anyone improve this regex

    /^[_A-z0-9-]+((\.|\+)[_A-z0-9-]+)*@[A-z0-9-]+(\.[A-z0-9-]+)*(\.[A-z]{2,4})$/

    to skip emails that have _ sign after the @ sign - that's what causes the error. _ in domain...
     
    x0x, Feb 20, 2010 IP
  13. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #13
    Or a simple regex that lets me pull emails from db that have _ signs after the @ sign would also help a lot!
     
    x0x, Feb 20, 2010 IP
  14. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #14
    For a start you have not escaped the - which is a special regex character for range, secondly your doing A-z - which is invalid if you want to match both do a-zA-Z or simply just do a-z and add the i modifier to the end.

    /^[_a-z0-9\-]+((\.|\+)[_a-z0-9\-]+)*@[a-z0-9\-]+(\.[a-z0-9\-]+)*(\.[a-z]{2,4})$/i
     
    Last edited: Feb 20, 2010
    danx10, Feb 20, 2010 IP
  15. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #15
    Thank you danx10!
     
    x0x, Feb 20, 2010 IP
  16. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #16
    For what it's worth, you can use an unescaped - as the last character in square brackets.
     
    SmallPotatoes, Feb 21, 2010 IP
  17. Marshton

    Marshton Peon

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Lol @ this:

    Alternately [I dont understand regular expressions so :|] use this very large email regular expression checkerwhotzit. I think it'd work, but try:

    
    (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t] 
    )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?: \r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ 
    \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:( ?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\0 31]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\ 
    ](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+ (?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?: 
    (?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z |(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n) ?[ \t])*)*\<(?:(?:\r\n)?[ 
    \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\ r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n) ?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t] )*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])* )(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t] 
    )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*))*) *:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+ 
    |\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r \n)?[ \t])*)(?:\.(?:(?:\r\n)?[ 
    \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?: \r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t 
    ]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031 ]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\]( 
    ?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(? :(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(? 
    :\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(? :(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)? [ 
    \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ 
    \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]| \\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<> 
    @,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|" (?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t] )*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\ 
    ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ 
    \t])*(? :[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[ 
    \]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*))*|(?:[^()<>@,;:\\".\[\] \000- \031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|( ?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,; 
    :\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([ 
    ^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ 
    \t])*(?:[^()<>@,;:\\" .\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\ 
    ]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ 
    \t])*(?:[^()<>@,;:\\".\ [\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\ 
    r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ 
    \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\] 
    |\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ 
    \t])*)?(?:[^()<>@,;:\\".\[\] \0 00-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\ .|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@, 
    ;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(? :[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])* (?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\". 
    \[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ 
    \t])*(?:[ ^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\] 
    ]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ 
    \t])*)(?:,\s*( ?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\ ".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:( ?:\r\n)?[ 
    \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[ 
    \["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t ])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t 
    ])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*)(? :\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+| 
    \Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*))*|(?: [^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\".\[\ ]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n) ?[ 
    \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\[" 
    ()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*)(?:\.(?:(?:\r\n) ?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<> 
    @,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@, 
    ;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*)(?:\.(?:(?:\r\n)?[ \t] )*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\ 
    ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ 
    \t])*)? (?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ 
    \t])+|\Z|(?=[\["()<>@,;:\\". \[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?: \r\n)?[ 
    \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[ 
    "()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t]) *))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t]) 
    +|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*)(?:\ .(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z 
    |(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ 
    \t])*))*\>(?:( ?:\r\n)?[ \t])*))*)?;\s*)
    
    Code (markup):
    Random googling found that
     
    Marshton, Feb 21, 2010 IP
  18. x0x

    x0x Well-Known Member

    Messages:
    510
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #18
    Jeez....... :D
     
    x0x, Feb 21, 2010 IP