77;20202;0ccatbody - よくきたWiki

Loading ...


<?php

define( "_SYS_ROOT_DIR_", dirname( __FILE__)."/");
$include_path[] = _SYS_ROOT_DIR_."share/pear/";
ini_set( 'include_path', implode( ":", $include_path));
?>

Net_POP3

Net_POP3
connect
disconnect
getRawHeaders
getParsedHeaders
getBody
getSize
login
numMsg
deleteMsg
getListing
<?php
require_once 'common.inc.php';
require_once 'Net/POP3.php';

$pop3 = new Net_POP3;
$pop3->connect( 'localhost', 110);
$pop3->login( 'popuser', 'poppass', $apop);

for ( $i = 1; $i <= $mailNum; $i++) {
  $headers = $pop3->getParsedHeaders( $i));

}
$pop3->disconnect();
?>

Mail

*1

factory
send

require_once 'common.inc.php';
require_once 'Mail.php';
$headers = array();
$headers[ 'Subject'] = 'This is test mail!!';
$headers[ 'From'] = 'fromuser@example.com';
$headers[ 'To'] = 'to@example.com';
$body = <<<EOD

Hi,
This mail test mail!!

EOD;
$recipients = $headers[ 'To'];

$params = array();
$params[ 'server'] = 'smtp@example.com';
$params[ 'port'] = 25;
$params[ 'auth'] = false;
$mailObject =& Mail::factory('smtp', $params);
$mailObject->send( $recipients, $headers, $body);

Mail_mimePart

Mail_mimeDecode

Mail_mimeDecode
decode
uudecode
getXML
require_once 'common.inc.php';
require_once 'Net/POP3.php';
require_once 'Mail/mimeDecode.php';
$pop3 = new Net_POP3;

$params['include_bodies'] = true;
$params['decode_bodies']  = true;
$params['decode_headers'] = true;
$params['input'] = $pop3->getMsg( $msg_id);
$mail = Mail_mimeDecode::decode( $params);

Mail_RFC822

*2

parseAddressList
$to = "Tadashi Jokagi <jokagi@example.com>, webmaster of example.com <webmaster>";


*1
*2
リロード   新規 編集 凍結 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS
最終修正日時: Sun, 16 Nov 2003 23:29:01 JST (5693d)
文字数(HTML): 1787
文字数(Wiki): 4163
人気ブログランキング - よくきた wiki