(PHP 3, PHP 4 )
imap_append --
특정 메일박스에 문자열 메시지를 덧붙인다.
Description
int
imap_append ( int imap_stream, string mbox, string message [, string flags])
성공하면 TRUE를 에러가 발생하면 FALSE를 리턴한다.
imap_append()함수는 특정
메일박스mbox에 문자열 메시지를 덧붙인다.
선택적 인수flags가 부여되면,
flags도 그 메일박스에 쓴다.
Cyrus IMAP 서버에 접근할 때에는, end-of-line terminator로 "\n" 대신에
"\r\n"을 사용해야 한다. 그렇지 않으면 실패할 것이다.
예 1. imap_append() example $stream = imap_open("{your.imap.host}INBOX.Drafts","username", "password");
$check = imap_check($stream);
print "Msg Count before append: ". $check->Nmsgs."\n";
imap_append($stream,"{your.imap.host}INBOX.Drafts"
,"From: me@my.host\r\n"
."To: you@your.host\r\n"
."Subject: test\r\n"
."\r\n"
."this is a test message, please ignore\r\n"
);
$check = imap_check($stream);
print "Msg Count after append : ". $check->Nmsgs."\n";
imap_close($stream); |
|