Make it work if To is only an address
This commit is contained in:
parent
848dcc5370
commit
1059a4108a
@ -173,8 +173,12 @@ function sendEmail( $to, $subject, $body, $headers, $param)
|
|||||||
|
|
||||||
foreach ( $to_list as $one ) {
|
foreach ( $to_list as $one ) {
|
||||||
if ( $first == 0 ) $to .= ',' ;
|
if ( $first == 0 ) $to .= ',' ;
|
||||||
$to_cut = explode( '<' ,$one, 2 ) ;
|
if ( preg_match( "/</", $one ) ) {
|
||||||
|
$to_cut = explode( '<' ,$one ) ;
|
||||||
$to .= '=?UTF-8?B?' . base64_encode( $to_cut[ 0 ] ) . '?= <' . $to_cut[ 1 ] ;
|
$to .= '=?UTF-8?B?' . base64_encode( $to_cut[ 0 ] ) . '?= <' . $to_cut[ 1 ] ;
|
||||||
|
} else {
|
||||||
|
$to .= $one ;
|
||||||
|
}
|
||||||
$first = 0 ;
|
$first = 0 ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user