Changeset 735 for branches/1.1dev/lib


Ignore:
Timestamp:
Oct 30, 2020 11:44:05 PM (4 years ago)
Author:
anonymous
Message:

Minor polish. Add getHttpHeader function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/lib/Email.inc.php

    r708 r735  
    7676        . '((?:[^.<>\s@\",\[\]]+[^<>\s@\",\[\]])*[^.<>\s@\",\[\]]+)'    // Local-part
    7777        . '@'                                                           // @
    78         . '((?:(\[)|[A-Z0-9]?)'                                         // Domain, first char
     78        . '((?:(\[)|[a-z0-9]?)'                                         // Domain, first char
    7979        . '(?(4)'                                                       // Domain conditional for if first domain char is [
    8080        . '(?:[0-9]{1,3}\.){3}[0-9]{1,3}\]'                             // TRUE, matches IP address
    8181        . '|'
    82         . '[.-]?(?:[A-Z0-9]+[-.])*(?:[A-Z0-9]+\.)+[A-Z]{2,6}))'         // FALSE, matches domain name
     82        . '[.-]?(?:[a-z0-9]+[-.])*(?:[a-z0-9]+\.)+[a-z]{2,19}))'        // FALSE, matches domain name
    8383        . '(?(1)'                                                       // Comment conditional for if initial < exists
    8484        . '(?:>\s*|>\s+\([^,@]+\)\s*)'                                  // TRUE, ensure ending >
     
    292292
    293293        // This is the address where delivery problems are sent to. We must strip off everything except the local@domain part.
    294         $envelope_sender_address = preg_replace('/^.*<?([^\s@\[\]<>()]+\@[A-Za-z0-9.-]{1,}\.[A-Za-z]{2,5})>?$/iU', '$1', $this->_params['from']);
     294        $envelope_sender_address = preg_replace('/^.*<?([^\s@\[\]<>()]+\@[A-Za-z0-9.-]{1,}\.[A-Za-z]{2,19})>?$/iU', '$1', $this->_params['from']);
    295295        if ('' != $envelope_sender_address && $this->validEmail($envelope_sender_address)) {
    296296            $envelope_sender_header = sprintf('-f %s', $envelope_sender_address);
Note: See TracChangeset for help on using the changeset viewer.