-
- // This is a proposed interface to save messages in the sent folder
- // -- gustavf
- //
- // $imap_stream = sqimap_login($username, $key, $imapServerAddress, 1);
- // sqimap_append ($imap_stream, $sent_folder, $length);
- // write822Header ($imap_stream, .....);
- // writeBody ($imap_stream, ....);
- // sqimap_append_done($imap_stream);
- //
- // Or something like that...
-
+ $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 1);
+ if (sqimap_mailbox_exists ($imap_stream, $sent_folder)) {
+ sqimap_append ($imap_stream, $sent_folder, $length);
+ write822Header ($imap_stream, $t, $c, $b, $subject);
+ writeBody ($imap_stream, $body);
+ sqimap_append_done ($imap_stream);
+ }
+