Example #1
0
 /**
  * Build a new EHLO response string advertising the extensions set
  * @param array extensions
  */
 public static function setExtensions($array)
 {
     if (!empty($array)) {
         $ret = "250-php-native-mail.swift Hello localhost.localdomain [127.0.0.1]";
     } else {
         return self::$extList = "250 php-native-mail.swift Hello localhost.localdomain [127.0.0.1]";
     }
     $num = count($array);
     for ($i = 0; $i < $num; $i++) {
         if ($i < $num - 1) {
             $ret .= "\r\n250-" . $array[$i];
         } else {
             $ret .= "\r\n250 " . $array[$i];
         }
     }
     self::$extList = $ret;
 }