Re: Bug #3398: imap_append not implemented
| From: | Hartmut Holzgraefe | Date: | Mon, 07 Feb 2000 19:45:41 +0000 |
| Subject: | Re: Bug #3398: imap_append not implemented | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-15284@lists.php.net to get a copy of this message | ||
mike@bedarra.com wrote:
> Bug description: imap_append not implemented
>
> Calling imap_append fails to append the message. The server logs show no APPEND request being
> received. Also imap_append is returning null rather than a boolean.
>
> Using imap 4.7a.
>
it should work like this, at least on
SuSe 6.3 with cyrus server and UWimap 4.7a client libs:
-- script --
#!/usr/local/bin/php4 -q
<?
$stream = imap_open("{your.server}INBOX","user", "passwd");
$check = imap_mailboxmsginfo($stream);
print "Msg Count before append: ". $check->Nmsgs."\n";
imap_append($stream,"{your.server}INBOX"
,"From: me\r\nTo: you\r\nSubject: test\r\n\r\ntest");
$check = imap_mailboxmsginfo($stream);
print "Msg Count after append : ". $check->Nmsgs."\n";
imap_close($stream);
?>
-- output --
hartmut > test_imap_append.php
Msg Count before append: 2
Msg Count after append : 3
-- done --
Did you use a fully quallified mailbox-name, that is "{server}mailbox"
and not just 'mailbox' ?
And did you use CarriageReturn-LineFeed ('\r\n') as end-of-line
terminator? (at least cyrus-imap seems to depend on this?)
--
Hartmut Holzgraefe hartmut@six.de http://www.six.de
Besuchen Sie Six auf der CeBIT (24.2.-1.3.) in Halle 10, Stand 425,
und auf der Hannover-Messe (20.-25.3.) in Halle 14, Stand J50!