X


 

[ Pobierz całość w formacie PDF ]
. % means to return the current level only. % as thepatternparameter will return only the toplevel mailboxes;  ~/mail/% on UW_IMAPD will return every mailbox in the ~/mail directory, butnone in subfolders of that directory.Przykład 1.imap_getmailboxes() example$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)or die("can t connect: ".imap_last_error());$list = imap_getmailboxes($mbox,"{your.imap.host}","*");if(is_array($list)) {reset($list);while (list($key, $val) = each($list)){print "($key) ";print imap_utf7_decode($val->name).",";print " ".$val->delimiter." ,";print $val->attributes."\n";}} elseprint "imap_getmailboxes failed: ".imap_last_error()."\n";imap_close($mbox);See also imap_getsubscribed().imap_getsubscribed (PHP 3>= 3.12, PHP 4 )List all the subscribed mailboxes738 IMAParray imap_getsubscribed ( int imap_stream, string ref, string pattern) \linebreakThis function is identical to imap_getmailboxes(), except that it only returns mailboxes that the useris subscribed to.imap_header (PHP 3, PHP 4 )Read the header of the messageobject imap_header ( int imap_stream, int msg_number [, int fromlength [, int subjectlength [, string de-faulthost]]]) \linebreakThis is an alias to imap_headerinfo() and is identical to this in any way.imap_headerinfo (PHP 3, PHP 4 )Read the header of the messageobject imap_headerinfo ( int imap_stream, int msg_number [, int fromlength [, int subjectlength [, stringdefaulthost]]]) \linebreakThis function returns an object of various header elements.remail, date, Date, subject, Subject, in_reply_to, message_id,newsgroups, followup_to, referencesmessage flags:Recent -  R if recent and seen, N if recent and not seen,  if not recentUnseen -  U if not seen AND not recent,  if seen OR not seen and recentAnswered - A if answered,  if unansweredDeleted -  D if deleted,  if not deletedDraft -  X if draft,  if not draftFlagged -  F if flagged,  if not flaggedNOTE that the Recent/Unseen behavior is a little odd.If you want toknow if a message is Unseen, you must check forUnseen ==  U || Recent ==  Ntoaddress (full to: line, up to 1024 characters)to[] (returns an array of objects from the To line, containing):739 IMAPpersonaladlmailboxhostfromaddress (full from: line, up to 1024 characters)from[] (returns an array of objects from the From line, containing):personaladlmailboxhostccaddress (full cc: line, up to 1024 characters)cc[] (returns an array of objects from the Cc line, containing):personaladlmailboxhostbccaddress (full bcc line, up to 1024 characters)bcc[] (returns an array of objects from the Bcc line, containing):personaladlmailboxhostreply_toaddress (full reply_to: line, up to 1024 characters)reply_to[] (returns an array of objects from the Reply_to line,containing):personaladlmailboxhostsenderaddress (full sender: line, up to 1024 characters)sender[] (returns an array of objects from the sender line, containing):personaladlmailboxhostreturn_path (full return-path: line, up to 1024 characters)return_path[] (returns an array of objects from the return_path line,containing):personaladlmailboxhostudate (mail message date in unix time)740 IMAPfetchfrom (from line formatted to fitfromlengthcharacters)fetchsubject (subject line formatted to fitsubjectlengthcharacters)imap_headers (PHP 3, PHP 4 )Returns headers for all messages in a mailboxarray imap_headers ( int imap_stream) \linebreakReturns an array of string formatted with header info.One element per mail message.imap_last_error (PHP 3>= 3.12, PHP 4 )This function returns the last IMAP error (if any) that occurred during this page requeststring imap_last_error ( void) \linebreakThis function returns the full text of the last IMAP error message that occurred on the current page.The error stack is untouched; calling imap_last_error() subsequently, with no intervening errors,will return the same error.imap_listmailbox (PHP 3, PHP 4 )Read the list of mailboxesarray imap_listmailbox ( int imap_stream, string ref, string pattern) \linebreakReturns an array containing the names of the mailboxes.See imap_getmailboxes() for a descriptionofref andpattern.Przykład 1.imap_listmailbox() example$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)or die("can t connect: ".imap_last_error());$list = imap_listmailbox($mbox,"{your.imap.host}","*");if(is_array($list)) {reset($list);while (list($key, $val) = each($list))print imap_utf7_decode($val)."\n";} elseprint "imap_listmailbox failed: ".imap_last_error()."\n";741 IMAPimap_close($mbox);imap_listsubscribed (PHP 3, PHP 4 )List all the subscribed mailboxesarray imap_listsubscribed ( int imap_stream, string ref, string pattern) \linebreakReturns an array of all the mailboxes that you have subscribed.This is almost identical toimap_listmailbox(), but will only return mailboxes the user you logged in as has subscribed.imap_mail_compose (PHP 3>= 3.5, PHP 4 )Create a MIME message based on given envelope and body sectionsstring imap_mail_compose ( array envelope, array body) \linebreakPrzykład 1.imap_mail_compose() exampleimap_mail_copy (PHP 3, PHP 4 )Copy specified messages to a mailboxint imap_mail_copy ( int imap_stream, string msglist, string mbox [, int flags]) \linebreakReturnsTRUEon success andFALSEon error.Copies mail messages specified bymsglistto specified mailbox.msglistis a range not justmessage numbers (as described in RFC2060 (http://www.faqs.org/rfcs/rfc2060.html)).Flags is a bitmask of one or more of" CP_UID - the sequence numbers contain UIDS" CP_MOVE - Delete the messages from the current mailbox after copyingimap_mail_move (PHP 3, PHP 4 )Move specified messages to a mailboxint imap_mail_move ( int imap_stream, string msglist, string mbox [, int flags]) \linebreakMoves mail messages specified bymsglistto specified mailbox.msglistis a range not justmessage numbers (as described in RFC2060 (http://www.faqs.org/rfcs/rfc2060.html)).Flags is a bitmask and may contain the single option" CP_UID - the sequence numbers contain UIDSReturnsTRUEon success andFALSEon error.imap_mail (PHP 3>= 3.14, PHP 4 )Send an email message743 IMAPstring imap_mail ( string to, string subject, string message [, string additional_headers [, string cc [, stringbcc [, string rpath]]]]) \linebreakThis function allows sending of emails with correct handling of Cc and Bcc receivers.Theparameters to, cc and bcc are all strings and are all parsed as rfc822 address lists.The receiversspecified in bcc will get the mail, but are excluded from the headers.Use the rpath parameter tospecify return path.This is useful when using php as a mail client for multiple users.imap_mailboxmsginfo (PHP 3>= 3.2, PHP 4 )Get information about the current mailboxobject imap_mailboxmsginfo ( int imap_stream) \linebreakReturns information about the current mailbox.ReturnsFALSEon failure.The imap_mailboxmsginfo() function checks the current mailbox status on the server.It is similarto imap_status(), but will additionally sum up the size of all messages in the mailbox, which will takesome additional time to execute.It returns the information in an object with following properties.Tabela 1.Mailbox propertiesDate date of last changeDriver driverMailbox name of the mailboxNmsgs number of messagesRecent number of recent messagesUnread number of unread messagesDeleted number of deleted messagesSize mailbox sizePrzykład 1.imap_mailboxmsginfo() exampleDate."\n" ;print "Driver: ".$check->Driver."\n" ;print "Mailbox: ".$check->Mailbox."\n" ;print "Messages: ".$check->Nmsgs."\n" ;print "Recent: ".$check->Recent."\n" ;print "Unread: ".$check->Unread."\n" ;print "Deleted: ".$check->Deleted [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • swpc.opx.pl
  •  
     

    Drogi użytkowniku!

    W trosce o komfort korzystania z naszego serwisu chcemy dostarczać Ci coraz lepsze usługi. By móc to robić prosimy, abyś wyraził zgodę na dopasowanie treści marketingowych do Twoich zachowań w serwisie. Zgoda ta pozwoli nam częściowo finansować rozwój świadczonych usług.

    Pamiętaj, że dbamy o Twoją prywatność. Nie zwiększamy zakresu naszych uprawnień bez Twojej zgody. Zadbamy również o bezpieczeństwo Twoich danych. Wyrażoną zgodę możesz cofnąć w każdej chwili.

     Tak, zgadzam się na nadanie mi "cookie" i korzystanie z danych przez Administratora Serwisu i jego partnerów w celu dopasowania treści do moich potrzeb. Przeczytałem(am) Politykę prywatności. Rozumiem ją i akceptuję.

     Tak, zgadzam się na przetwarzanie moich danych osobowych przez Administratora Serwisu i jego partnerów w celu personalizowania wyświetlanych mi reklam i dostosowania do mnie prezentowanych treści marketingowych. Przeczytałem(am) Politykę prywatności. Rozumiem ją i akceptuję.

    Wyrażenie powyższych zgód jest dobrowolne i możesz je w dowolnym momencie wycofać poprzez opcję: "Twoje zgody", dostępnej w prawym, dolnym rogu strony lub poprzez usunięcie "cookies" w swojej przeglądarce dla powyżej strony, z tym, że wycofanie zgody nie będzie miało wpływu na zgodność z prawem przetwarzania na podstawie zgody, przed jej wycofaniem.