Qdmail - PHP::Mail Library , Quick and Detailed for Multibyte

<若≪鴻若激с

<若≪鴻若激с

Qdmailс<若≪鴻罩h頫憗сс障
с靎≦罩h頫憗с@(≪若)障腮綺с
(1.1.8b篁ラ罘純с鐚

膂≦罩h頫憗

<若≪鴻с絎с罩h頫憗сс茫筝純荐障
鐚鐚<若≪鴻筝眼罩h頫

罩h頫憗篏帥у蚊綽荀腮綺激鴻荀羆荀篁吟障
cQdmailс綽荀篏罩h頫憗箴筝荳紊若吟若罩h頫憗紊眼<純障

Qdmailсpreg_match∽違
/[^@]+@[^@]+/
c障

篏帥

$mail -> varidateAddressRegex( 'preg_match罩h頫' );
泣潟鐚
$mail -> varidateAddressRegex( '/[^@]+@[^@]+/' );
preg∽違若喝冴障(/)筝荀с

泣潟鐚
Qdmail羝<≪鴻null障絖''сc翫若冴
$mail -> varidateAddressRegex( '/([^@]+@[^@]+)|(^$)/' );
泣潟鐚
CakePHP v 1.2.0.3830 т戎罩h頫
 $mail -> varidateAddressRegex(
    '/^[a-z0-9!#$%&'*+\/=?^_`|~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`|~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]2,4|museum|travel)$/i'
 );

篏若激с潟<純篏帥

罩h頫憗х莇潟鴻<若≪鴻若激с渇∽違篏Qdmail腟粋昭純с
若若с若激с潟<純<翫篏帥сс

箴違篏<若≪鴻若激с渇∽違

鴻Validation<純email()с違
$mail -> addressValidationMethod('Validation','email');

<純email若激с潟OK翫true,<翫false菴ゃ菴筝

Qdmailс
call_user_func( array('Validation','email') , $addr );
綵≪у若喝冴障
鐚鴻帥c若潟с鐚

篏若激с潟<純箴

<?php

class Validation {

   function email( $address ){

   if(0==preg_match( '/([^@]+@[^@]+)|(^$)/' , $address)){
         return false;
      }else{
         return true;
      }
   }

}
鴻<ゃ若吟若ゃ潟若
鐚篏c茲<純с鐚
  • 2008-10-04 Qdmail - PHP::Mail Library , Quick and Detailed for Multibyte spok
    Qdmai潟若若吾< 2008-10-04 1.1.8b <純域┃varidateAddressRegex()addressValidationMethod()allowBlankHeader